Software AG Products 10.7 | Using API Gateway | API Gateway Administration | Security Configuration | OAuth, JWT, and OpenID Configuration | JWT Authentication Use case and Workflow | Retrieving JWT Token with Claim
 
Retrieving JWT Token with Claim
When you retrieve a JWT token for a particular application, the application is authenticated using the application identifiers provided in the request, such as, APIKey or Username or Host name, and then a token is generated with application id as a subject.
For example, consider multiple developers using an application to retrieve an access token. In such a scenario, each user can have a claim that can be used to identify the user who made a particular transaction.
*To retrieve a JWT token with claim
1. Open your REST client.
2. Make a POST call to the following URL, with the IP address of the system where API Gateway is installed in place of localhost:
http://localhost:5555/gateway/security/getJsonWebToken
For example,
http://localhost:5555/rest/pub/apigateway/jwt/getJsonWebToken
3. Provide your claim identifiers in the Request section:
{ "claimsSet": { "identifier": "value"} }
For example,
{ "claimsSet": { "name": "username", "company": "organization" } }
Note:
Before invoking this service, ensure that the authorization server is configured and the scope mapping is done.
The access token is displayed in the Response section. The subject claim of the token generated by making a POST call will be the ID of the identified application.