Apache CXF API

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

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

public class AccessTokenService
extends AbstractOAuthService

OAuth2 Access Token Service implementation


Constructor Summary
AccessTokenService()
           
 
Method Summary
protected  javax.ws.rs.core.Response createErrorResponse(javax.ws.rs.core.MultivaluedMap<String,String> params, String error)
           
protected  javax.ws.rs.core.Response createErrorResponseFromBean(OAuthError errorBean)
           
protected  AccessTokenGrantHandler findGrantHandler(javax.ws.rs.core.MultivaluedMap<String,String> params)
          Find the mathcing grant handler
 javax.ws.rs.core.Response handleTokenRequest(javax.ws.rs.core.MultivaluedMap<String,String> params)
          Processes an access token request
 void setGrantHandlers(List<AccessTokenGrantHandler> handlers)
          Sets the list of optional grant handlers
 void setWriteCustomErrors(boolean write)
           
 void setWriteOptionalParameters(boolean write)
           
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.services.AbstractOAuthService
checkTransportSecurity, getClient, getClient, getDataProvider, getMessageContext, getQueryParameters, reportInvalidRequestError, setBlockUnsecureRequests, setDataProvider, setMessageContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessTokenService

public AccessTokenService()
Method Detail

setWriteOptionalParameters

public void setWriteOptionalParameters(boolean write)

setWriteCustomErrors

public void setWriteCustomErrors(boolean write)

setGrantHandlers

public void setGrantHandlers(List<AccessTokenGrantHandler> handlers)
Sets the list of optional grant handlers

Parameters:
handlers - the grant handlers

handleTokenRequest

public javax.ws.rs.core.Response handleTokenRequest(javax.ws.rs.core.MultivaluedMap<String,String> params)
Processes an access token request

Parameters:
params - the form parameters representing the access token grant
Returns:
Access Token or the error

findGrantHandler

protected AccessTokenGrantHandler findGrantHandler(javax.ws.rs.core.MultivaluedMap<String,String> params)
Find the mathcing grant handler


createErrorResponse

protected javax.ws.rs.core.Response createErrorResponse(javax.ws.rs.core.MultivaluedMap<String,String> params,
                                                        String error)

createErrorResponseFromBean

protected javax.ws.rs.core.Response createErrorResponseFromBean(OAuthError errorBean)

Apache CXF API

Apache CXF