Class AuthorizationCodeGrant

java.lang.Object
org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeGrant
All Implemented Interfaces:
Serializable, AccessTokenGrant
Direct Known Subclasses:
JwtRequestCodeGrant, ServerAuthorizationCodeGrant

@MappedSuperclass public class AuthorizationCodeGrant extends Object implements AccessTokenGrant
Base Authorization Code Grant representation, captures the code and the redirect URI this code has been returned to, visible to the client
See Also:
  • Constructor Details

    • AuthorizationCodeGrant

      public AuthorizationCodeGrant()
    • AuthorizationCodeGrant

      public AuthorizationCodeGrant(String code)
    • AuthorizationCodeGrant

      public AuthorizationCodeGrant(String code, URI uri)
  • Method Details

    • setRedirectUri

      public void setRedirectUri(String redirectUri)
      Sets the redirect URI, if set then the client is expected to include the same URI during the access token request
      Parameters:
      redirectUri - redirect URI
    • getRedirectUri

      public String getRedirectUri()
      Gets the redirect URI
      Returns:
      the redirect URI
    • getCode

      public String getCode()
      Gets the authorization code
      Returns:
      the code
    • setCode

      public void setCode(String c)
    • getType

      public String getType()
      Returns the token grant type, example, "authorization_code"
      Specified by:
      getType in interface AccessTokenGrant
      Returns:
      the grant type
    • toMap

      public jakarta.ws.rs.core.MultivaluedMap<String,String> toMap()
      Returns the map containing public grant parameters; can be used by clients requesting the access tokens.
      Specified by:
      toMap in interface AccessTokenGrant
      Returns:
      the grant parameters
    • getCodeVerifier

      public String getCodeVerifier()
    • setCodeVerifier

      public void setCodeVerifier(String codeVerifier)