Giter VIP home page Giter VIP logo

gpi-v5-fork-mahdib's Introduction

SWIFT gpi API demo application in Java

Make calls to SWIFT APIs is easy using SWIFT SDK. All you need to do is add the SWIFT SDKs as dependency when building your Java application through Maven or Gradle.

We built this demo Java application with Maven to show you how we are using it to make calls to SWIFT gpi APIs in the API Sandbox.

Getting Started

Prerequisites

  • Java 17 and above
  • maven 3.5.* and above

Install SWIFT SDK

Download SWIFT SDK from SWIFT Developer Portal, login is required for download.

Unpackage the zip file and install the dependency in your local .m2 repository.

$ install.sh

Install SWIFT Security SDK

Download SWIFT Security SDK from SWIFT Developer Portal, login is required for download.

Unpackage the zip file and install the dependency in your local .m2 repository.

$ install.sh

Update Dependencies

In cases where the SDK version in the pom.xml file do not match the ones available on SWIFT Developer Portal, please run the following command. The versions plugin will update your pom file with the latest available in your local repository.

After installing the SDK packages, navigate to where you have cloned this project and execute these in the same directory as the pom.xml file.

$ mvn versions:use-latest-versions -Dincludes=com.swift.commons.oauth:swift-security-sdk
$ mvn versions:use-latest-versions -Dincludes=com.swift.apisdk:swift-sdk-swagger

Configure runtime SDK properties

Update config/config-swift-connect.yaml with your application credentials, consumer-key & consumer-secret. Obtain from SWIFT Developer Portal by creating an app.

To use forward proxies update config/config-swift-connect-fp.yaml with your application credentials, consumer-key & consumer-secret and forward proxy information. Obtain from SWIFT Developer Portal by creating an app.

Build

$ mvn clean install

Run

$ java -Dlog4j.configuration=file:config/log4j.properties -jar target/gpi-v5-demo-app-jar-with-dependencies.jar config/config-swift-connect.yaml

To use forward proxies:

$ java -Dlog4j.configuration=file:config/log4j.properties -jar target/gpi-v5-demo-app-jar-with-dependencies.jar config/config-swift-connect-fp.yaml

Keystore

The keystore (conf/keystore.jks) has these several entried that may need renewing when the Sandbox certificate is renewed:

  • globalsign_root_ca_r3, 18 Oct 2022, trustedCertEntry, Sandbox server root ca
  • globalsign_rsa_ov_ssl_ca_2018, 18 Oct 2022, trustedCertEntry, Sandbox server sub ca
  • sandbox_pub, 18 Oct 2022, trustedCertEntry, Sandbox server cert. Potentially not needed given its roots are present (see above)
  • selfsigned, 18 Jun 2020, PrivateKeyEntry, Demo client key

Authors

[email protected] [email protected]

gpi-v5-fork-mahdib's People

Contributors

rcousins avatar asalinas12 avatar elbehimahdi avatar yinchanted avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.