- KB API Business portal
- KB API Developer portal
- KB ADAA API Java SDK
- KB Client Registration API Java SDK
- ADAA API technical manual (for production version)
- ADAA API technical manual (for sandbox version)
This Java web application serves as a reference example, or an inspiration for developers who want to develop software based on the KB ADAA API. This example is based on the Spring Boot framework. For more examples check our Github repository.
-
Complete application properties located in the
./web/src/main/resources/application.yml
file:adaa-examle.client-registration-uri
- URI of the page of the KB Client Registration pageadaa-examle.authorization-uri
- URI of the page of the KB Authorization server for getting OAuth2 authorization codeadaa-examle.access-token-uri
- URI of the endpoint of the KB OAuth2 API for getting access tokenadaa-examle.secret
- Base64 encoded 256-bit key that used during getting client registration processadaa-examle.keystore-location
- path to the keystore with client certificateadaa-examle.keystore-password
- password of the keystore with client certificateadaa-examle.client-cert-password
- password of the client certificateadaa.client.baseUri
- URI of the KB ADAA APIadaa.client.apiKey
- authorization API key generated at KB API Developer portalclientregistration.client.baseUri
- URI of the endpoint of the KB Client Registration API for getting software statementclientregistration.client.apiKey
- authorization API key generated at KB API Developer portal
-
You should build this project with Maven
mvn clean install
and then run the embedded Tomcat server using command in web maven module:
mvn spring-boot:run -pl web
-
Or you can deploy a built
war
file to your own instance of the application server
Don't forget to put your certificate somewhere inside the docker and fill in the application.yml
path inside the container!
make build
make start
KB ADAA API authorization process is based on the OAuth2 specification. Thus, to call KB ADAA API and get user's transaction history you must complete following steps:
- Registration of the application's instance
- user grants access
- gets software statement by calling
SoftwareStatementsApi#softwareStatement(SoftwareStatement req)
using KB Client Registration API Java SDK - redirects user to the KB login page for authentication
- after success authentication KB SAML server will send response with an encrypted client ID and a client secret to
/register/client
application endpoint. Application decrypts client's registration data and store them to the further usage
- OAuth2 authorization process
- redirects user to KB OAuth2 authorization page. After user grant access, KB authorization server
will send a redirect response with authorization code back to the application's endpoint
/oauth2/authorize
- application calls KB OAuth2 API to get access token
- redirects user to KB OAuth2 authorization page. After user grant access, KB authorization server
will send a redirect response with authorization code back to the application's endpoint
- Call KB ADAA API
- application call KB ADAA API for user's transaction history and account balance
- return HTML page with displayed transaction history and account balance to the user
The whole flow of this application is described by sequence diagram below:
For further details please read ADAA API technical manual (for production version) or ADAA API technical manual (for sandbox version).
If you still have any questions please contact a KB API support team.