Class TokenUtils


  • public class TokenUtils
    extends Object
    A class for token utility operations.
    • Constructor Detail

      • TokenUtils

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