Apache CXF API

org.apache.cxf.rs.security.oauth2.grants.code
Class AuthorizationCodeGrant

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

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


Constructor Summary
AuthorizationCodeGrant(String code)
           
AuthorizationCodeGrant(String code, URI uri)
           
 
Method Summary
 String getCode()
          Gets the authorization code
 String getRedirectUri()
          Gets the redirect URI
 String getType()
          Returns the token grant type, example, "authorization_code"
 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
 javax.ws.rs.core.MultivaluedMap<String,String> toMap()
          Returns the map containing public grant parameters; can be used by clients requesting the access tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationCodeGrant

public AuthorizationCodeGrant(String code)

AuthorizationCodeGrant

public AuthorizationCodeGrant(String code,
                              URI uri)
Method Detail

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

getType

public String getType()
Returns the token grant type, example, "authorization_code"

Specified by:
getType in interface AccessTokenGrant
Returns:
the grant type

toMap

public javax.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

Apache CXF API

Apache CXF