Class StatefulToken

    • Constructor Detail

      • StatefulToken

        public StatefulToken​(Object object)
    • Method Detail

      • setId

        protected void setId​(String id)
        Sets the token id.
        Parameters:
        id - The token id.
      • setResourceOwnerId

        protected void setResourceOwnerId​(String resourceOwnerId)
        Sets the resource owner's id.
        Parameters:
        resourceOwnerId - The resource owner's id.
      • setClientId

        protected void setClientId​(String clientId)
        Sets the client's id.
        Parameters:
        clientId - The client's id.
      • setRedirectUri

        protected void setRedirectUri​(String redirectUri)
        Sets the redirect uri.
        Parameters:
        redirectUri - The redirect uri.
      • setScope

        protected void setScope​(Set<String> scope)
        Sets the scope.
        Parameters:
        scope - The scope.
      • setExpiryTime

        protected void setExpiryTime​(long expiryTime)
        Sets the expiry time.
        Parameters:
        expiryTime - The expiry time.
      • setAuthGrantId

        protected void setAuthGrantId​(String authGrantId)
        Sets the authorization grant id.
        Parameters:
        authGrantId - The authorization grant id.
      • setTokenType

        protected void setTokenType​(String tokenType)
        Sets the token type.
        Parameters:
        tokenType - The token type.
      • setTokenName

        protected void setTokenName​(String tokenName)
        Sets the token name.
        Parameters:
        tokenName - The token name.
      • setGrantType

        protected void setGrantType​(String grantType)
        Sets the grant type.
        Parameters:
        grantType - The grant type.
      • setAuthTime

        protected void setAuthTime​(long authTime)
        Sets the end user's original authentication time in seconds since epoch.
        Parameters:
        authTime - The authentication time.
      • getScope

        public Set<String> getScope()
        Gets the scope.
        Returns:
        The scope.
      • getClientId

        public String getClientId()
        Gets the client's id.
        Returns:
        The client's id.
      • getResourceOwnerId

        public String getResourceOwnerId()
        Gets the resource owner's id.
        Returns:
        The resource owner's id.
      • getTokenId

        public String getTokenId()
      • getTokenName

        public String getTokenName()
      • getRealm

        public String getRealm()
      • getClaims

        public String getClaims()
        Gets the requested claims associated w/ this access token.
        Returns:
        Requested claims (JSON as a String).
      • getTokenType

        public String getTokenType()
        Gets the token type.
        Returns:
        The token type.
      • getAuditTrackingId

        public String getAuditTrackingId()
      • getAuthTimeSeconds

        public long getAuthTimeSeconds()
        Gets the end user's authentication time in seconds.
        Returns:
        The authentication time.
      • getResourceString

        protected String getResourceString​(String string)
        Gets the display String for the given String.
        Parameters:
        string - The String.
        Returns:
        The display String.
      • getStringProperty

        protected String getStringProperty​(String key)
        Get a string property from the store.
        Parameters:
        key - The property key.
        Returns:
        The value.
      • setStringProperty

        protected final void setStringProperty​(String key,
                                               String value)
        Set a string property in the store.
        Parameters:
        key - The property key.
        value - The value.
      • toJsonValue

        public org.forgerock.json.JsonValue toJsonValue()
      • getTimeLeft

        protected Long getTimeLeft()
      • getExpiryTime

        public long getExpiryTime()
      • defaultExpireTime

        protected abstract long defaultExpireTime()
      • isExpired

        public boolean isExpired()
        Determines if the Access Token is expired.
        Returns:
        true if current time is greater than the expiry time.