Library for generating JWT Access Token in Java
i was working on a project for importing / exporting iFormBuilder form data using the API in java. Since i couldn't find any code for doing this in java i created my own library for people to use. Here it is: https://github.com/stanlivshin/iFormBuilder-JWT-Access-Token-Java
its pretty straight forward but does use a few external libraries. It primarily depends on "Nimbus JOSE + JWT" library for JWT generation and apache http client and lang2 for creating http-post and data conversions. You can get rid of the dependencies if you like and rewrite this code using Java SE.
Here is how easy it is to use:
String clientKey = "yourIFromBuilderClientKey";
String clientSecret = "yourIFromBuilderClientSecret";
String URL = "https://yourIFormBuilderCompany.iformbuilder.com/exzact/api/oauth/token";
String accessToken = AccessToken.getToken(clientKey, clientSecret, URL);
System.out.println("accessToken = " + accessToken);
Please sign in to leave a comment.