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 Details

    • TokenUtils

      public TokenUtils()
  • Method Details

    • 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 application
      clientSecret - Client secret of the application
      Returns:
      base64 encoded client Id:client secret