Apache CXF API

org.apache.cxf.rs.security.oauth2.services
Class AuthorizationCodeGrantService

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.services.AbstractOAuthService
      extended by org.apache.cxf.rs.security.oauth2.services.RedirectionBasedGrantService
          extended by org.apache.cxf.rs.security.oauth2.services.AuthorizationCodeGrantService

@Path(value="/authorize")
public class AuthorizationCodeGrantService
extends RedirectionBasedGrantService

This resource handles the End User authorising or denying the Client to access its resources. If End User approves the access this resource will redirect End User back to the Client, supplying the authorization code.


Constructor Summary
AuthorizationCodeGrantService()
           
 
Method Summary
protected  boolean canRedirectUriBeEmpty(Client c)
           
protected  boolean canSupportPublicClient(Client c)
           
protected  javax.ws.rs.core.Response createErrorResponse(javax.ws.rs.core.MultivaluedMap<String,String> params, String redirectUri, String error)
           
protected  javax.ws.rs.core.Response createGrant(javax.ws.rs.core.MultivaluedMap<String,String> params, Client client, String redirectUri, List<String> requestedScope, List<String> approvedScope, UserSubject userSubject, ServerAccessToken preauthorizedToken)
           
protected  javax.ws.rs.core.Response deliverOOBResponse(OOBAuthorizationResponse response)
           
protected  javax.ws.rs.core.UriBuilder getRedirectUriBuilder(String state, String redirectUri)
           
 void setCanSupportPublicClients(boolean support)
           
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.services.RedirectionBasedGrantService
authorize, authorizeDecision, authorizeDecisionForm, completeAuthorization, createAuthorizationData, createUserSubject, getClient, personalizeData, setPartialMatchScopeValidation, setResourceOwnerNameProvider, setSessionAuthenticityTokenProvider, setSubjectCreator, setUseRegisteredRedirectUriIfPossible, startAuthorization, validateRedirectUri
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.services.AbstractOAuthService
checkTransportSecurity, getDataProvider, getMessageContext, getQueryParameters, getValidClient, getValidClient, isWriteOptionalParameters, reportInvalidRequestError, reportInvalidRequestError, reportInvalidRequestError, reportInvalidRequestError, setBlockUnsecureRequests, setDataProvider, setMessageContext, setWriteOptionalParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationCodeGrantService

public AuthorizationCodeGrantService()
Method Detail

createGrant

protected javax.ws.rs.core.Response createGrant(javax.ws.rs.core.MultivaluedMap<String,String> params,
                                                Client client,
                                                String redirectUri,
                                                List<String> requestedScope,
                                                List<String> approvedScope,
                                                UserSubject userSubject,
                                                ServerAccessToken preauthorizedToken)
Specified by:
createGrant in class RedirectionBasedGrantService

deliverOOBResponse

protected javax.ws.rs.core.Response deliverOOBResponse(OOBAuthorizationResponse response)

createErrorResponse

protected javax.ws.rs.core.Response createErrorResponse(javax.ws.rs.core.MultivaluedMap<String,String> params,
                                                        String redirectUri,
                                                        String error)
Specified by:
createErrorResponse in class RedirectionBasedGrantService

getRedirectUriBuilder

protected javax.ws.rs.core.UriBuilder getRedirectUriBuilder(String state,
                                                            String redirectUri)

canSupportPublicClient

protected boolean canSupportPublicClient(Client c)
Specified by:
canSupportPublicClient in class RedirectionBasedGrantService

canRedirectUriBeEmpty

protected boolean canRedirectUriBeEmpty(Client c)
Specified by:
canRedirectUriBeEmpty in class RedirectionBasedGrantService

setCanSupportPublicClients

public void setCanSupportPublicClients(boolean support)

Apache CXF API

Apache CXF