Class SecurityToken


  • public class SecurityToken
    extends Object
    This class encapsulates the details of a security token.
    Since:
    1.2.0
    • Constructor Detail

      • SecurityToken

        public SecurityToken​(SecurityTokenType tokenType,
                             String tokenAudience,
                             String tokenValue,
                             Instant validFrom,
                             Instant validUntil)
        Creates an instance of security token.
        Parameters:
        tokenType - SecurityTokenType
        tokenAudience - path of the entity for which this security token is to be presented
        tokenValue - string representation of the token value
        validFrom - Instant from when this token is valid
        validUntil - Instant when this token expires
    • Method Detail

      • getTokenType

        public SecurityTokenType getTokenType()
        Gets the type of this security token.
        Returns:
        security token type
      • getTokenAudience

        public String getTokenAudience()
        Gets the path of the entity for which this token is to be presented.
        Returns:
        path of the entity for which this token is created
      • getTokenValue

        public String getTokenValue()
        Gets the value of this token.
        Returns:
        string representation of the token value
      • getValidFrom

        public Instant getValidFrom()
        Gets the start time of this token validity
        Returns:
        Instant from when this token is valid
      • getValidUntil

        public Instant getValidUntil()
        Gets the end time of this token validity.
        Returns:
        Instant when this token expires