Class SecurityTokenAdapter


  • public class SecurityTokenAdapter
    extends Object
    • Constructor Detail

    • Method Detail

      • isValid

        public boolean isValid()
        Checks to see if the current token is still valid
        Returns:
        true if valid
      • getStringClaim

        public String getStringClaim​(String key)
        Return a claim from the token
      • getTokenValidDuration

        public Duration getTokenValidDuration()
        Get the duration the token is valid, from issue time to expiration time.
        Returns:
        token validity duration
      • getSecurityToken

        public String getSecurityToken()
      • getTokenRemainingDuration

        public Duration getTokenRemainingDuration()
        Get the remaining duration for which the token is valid, from current time to expiration time.
        Returns:
        token remaining validity duration Example: If the token expires at 2025-12-08T15:00:00Z and the current time is 2025-12-08T14:30:00Z, this method will return a Duration of 30 minutes.