pub.jwt:extractClaimsFromJWT
WmPublic. This service returns specific claim details that you want to extract from a JWT. You can request a specific claim using the input parameter claims.
Input Parameters
jwt | String. The token from which you want to extract claims. |
truststoreAlias | String. Optional. Alias of the truststore that contains the list of certificates, which Integration Server uses to verify the JWT before extracting the claims. |
certAlias | String. Optional. Alias that identifies a trusted certificate within a truststore. |
claims | String[]. List of claims to be extracted. |
Output Parameters
message | String. Indicates whether the claims are successfully extracted or not. A success message or an error message followed by the details of claims extracted are displayed. |
claimsDetails | Document List. The service returns an array or a list of name and value pairs for each claim. |
Usage Notes
If you specify the truststoreAlias and certAlias input parameters, then the JWT verification is based on these inputs. Therefore, the issuer-certificate mapping in Integration Server Administrator, if any, is ignored.
If you do not specify the truststoreAlias and certAlias input parameters, then the JWT verification is based on the public key that you can get from the existing issuer-certificate mapping in Integration Server Administrator.
If you do not specify the truststoreAlias and certAlias input parameters, and an issuer-certificate mapping is not available in Integration Server Administrator, then the service returns an exception.
When the service parses a JWT that contains a number, the output of this service can be any of the subtypes of a number that best fits the value. For example: If the number fits an integer, then integer is returned.
If the token has numbers with values greater than 1e308, then the results are unpredictable.