Class AccessToken

    • Constructor Detail

      • AccessToken

        public AccessToken​(long expiresAt,
                           Map<String,​AttributeValue> attributes,
                           String scopeString,
                           String clientId,
                           String accessGrantGuid)
        Constructor for the AccessToken.
        Parameters:
        expiresAt - timestamp of when the access token expires.
        attributes - The attributes of this access token.
        scopeString - The scope of this access token.
        clientId - The client ID of this access token.
        accessGrantGuid - The access grant GUID of this access token.
      • AccessToken

        public AccessToken​(long expiresAt,
                           Map<String,​AttributeValue> attributes,
                           String scopeString,
                           String clientId,
                           String accessGrantGuid,
                           AuthorizationDetails authorizationDetails)
        Constructor for the AccessToken.
        Parameters:
        expiresAt - timestamp of when the access token expires.
        attributes - The attributes of this access token.
        scopeString - The scope of this access token.
        clientId - The client ID of this access token.
        accessGrantGuid - The access grant GUID of this access token.
        authorizationDetails - The authorization details of this access token.
    • Method Detail

      • getExpiresAt

        public long getExpiresAt()
        Returns when this access token expires.
        Returns:
        When this access token expires.
      • setExpiresAt

        public void setExpiresAt​(long exp)
        Set when this access token expires.
        Parameters:
        exp - Timestamp of when this access token expires.
      • isExpired

        public boolean isExpired()
        Checks whether or not this access token has expired.
        Returns:
        True if this access token has expired, false otherwise.
      • getAttributes

        public Map<String,​AttributeValue> getAttributes()
        Get the attributes of this access token.
        Returns:
        The attributes of this access token.
      • getScope

        public String getScope()
        Get the scope of this access token.
        Returns:
        The scope of this access token.
      • getClientId

        public String getClientId()
        Get the client ID of this access token.
        Returns:
        The client ID of this access token.
      • getAccessGrantGuid

        public String getAccessGrantGuid()
        Get the access grant GUID of this access token.
        Returns:
        The access grant GUID of this access token.
      • hasAccessGrantGuid

        public boolean hasAccessGrantGuid()
        Returns whether or not this access token has an access grant GUID.
        Returns:
        True if the access token has a grant GUID, false otherwise.
      • getAudience

        public List<String> getAudience()
        A list of identifiers representing the intended audience for this access token.
        Returns:
        A list of identifiers that are the intended audience for this access token
      • setAudience

        public void setAudience​(List<String> audience)
        Set the list of audience members this access token is intended for.
        Parameters:
        audience - - List of audience members.
      • getIssuer

        public String getIssuer()
        Get the issuer of this access token.
        Returns:
        - The issuer of this access token.
      • setIssuer

        public void setIssuer​(String issuer)
        Set the issuer of this access token.
        Parameters:
        issuer - - The issuer of this access token.
      • getTokenIdentifier

        public String getTokenIdentifier()
        Get the unique identifier for this access token.
        Returns:
        The unique identifier for this access token.
      • setTokenIdentifier

        public void setTokenIdentifier​(String tokenIdentifier)
        Set the unique identifier for this access token.
        Parameters:
        tokenIdentifier - - The unique identifier.
      • getAuthorizationDetails

        public AuthorizationDetails getAuthorizationDetails()
        Get the authorization details for this access token.
        Returns:
        The authorization details for this access token.