Class TokenUtils
- java.lang.Object
-
- org.wso2.am.integration.test.utils.token.TokenUtils
-
public class TokenUtils extends Object
A class for token utility operations.
-
-
Constructor Summary
Constructors Constructor Description TokenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetBase64EncodedAppCredentials(String clientId, String clientSecret)Returns the base64 encoded client Id:client secretstatic StringgetJtiOfJwtToken(String jwtToken)Parse a given JWT token and return 'jti' of the token.
-
-
-
Method Detail
-
getJtiOfJwtToken
public static String getJtiOfJwtToken(String jwtToken) throws ParseException
Parse a given JWT token and return 'jti' of the token.- Parameters:
jwtToken- JWT token- Returns:
- 'jti' of the token
- Throws:
ParseException- if an error occurred when parsing the token
-
getBase64EncodedAppCredentials
public static String getBase64EncodedAppCredentials(String clientId, String clientSecret)
Returns the base64 encoded client Id:client secret- Parameters:
clientId- Client Id of the applicationclientSecret- Client secret of the application- Returns:
- base64 encoded client Id:client secret
-
-