Class ServerAccessToken

java.lang.Object
org.apache.cxf.rs.security.oauth2.common.AccessToken
org.apache.cxf.rs.security.oauth2.common.ServerAccessToken
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BearerAccessToken, HawkAccessToken, RefreshToken

@MappedSuperclass public abstract class ServerAccessToken extends AccessToken
Server Access Token representation
See Also:
  • Constructor Details

    • ServerAccessToken

      protected ServerAccessToken()
    • ServerAccessToken

      protected ServerAccessToken(Client client, String tokenType, String tokenKey, long expiresIn)
    • ServerAccessToken

      protected ServerAccessToken(Client client, String tokenType, String tokenKey, long expiresIn, long issuedAt)
    • ServerAccessToken

      protected ServerAccessToken(ServerAccessToken token, String key)
  • Method Details

    • validateTokenType

      protected static ServerAccessToken validateTokenType(ServerAccessToken token, String expectedType)
    • getClient

      public Client getClient()
      Returns the Client associated with this token
      Returns:
      the client
    • setClient

      public void setClient(Client c)
    • getScopes

      public List<OAuthPermission> getScopes()
      Returns a list of opaque permissions/scopes
      Returns:
      the scopes
    • setScopes

      public void setScopes(List<OAuthPermission> scopes)
      Sets a list of opaque permissions/scopes
      Parameters:
      scopes - the scopes
    • getSubject

      public UserSubject getSubject()
      Returns a subject capturing the login name the end user used to login to the resource server when authorizing a given client request
      Returns:
      UserSubject
    • setSubject

      public void setSubject(UserSubject subject)
      Sets a subject capturing the login name the end user used to login to the resource server when authorizing a given client request
      Parameters:
      subject -
    • getGrantType

      public String getGrantType()
      Returns the grant type which was used to obtain the access token
      Returns:
      the grant type
    • setGrantType

      public void setGrantType(String grantType)
      Sets the grant type which was used to obtain the access token
      Parameters:
      grantType - the grant type
    • getResponseType

      public String getResponseType()
      Get the response type
      Returns:
      the response type, null if no redirection flow was used
    • setResponseType

      public void setResponseType(String responseType)
      Set the response type
      Parameters:
      responseType - the response type
    • getAudiences

      public List<String> getAudiences()
    • setAudiences

      public void setAudiences(List<String> audiences)
    • getClientCodeVerifier

      public String getClientCodeVerifier()
    • setClientCodeVerifier

      public void setClientCodeVerifier(String clientCodeVerifier)
    • getNonce

      public String getNonce()
    • setNonce

      public void setNonce(String nonce)
    • getExtraProperties

      public Map<String,String> getExtraProperties()
    • setExtraProperties

      public void setExtraProperties(Map<String,String> extraProperties)
    • getGrantCode

      public String getGrantCode()
      Get the grant code
      Returns:
      the grant code, null if no authorization code grant was used
    • setGrantCode

      public void setGrantCode(String grantCode)
      Set the grant code which was used to request the token
      Parameters:
      grantCode - the grant code