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.AbstractTokenService
          extended by org.apache.cxf.rs.security.oauth2.services.AccessTokenService

@Path(value="/token")
public class AccessTokenService
extends AbstractTokenService

OAuth2 Access Token Service implementation


Constructor Summary
AccessTokenService()
           
 
Method Summary
protected  void checkAudience(javax.ws.rs.core.MultivaluedMap<String,String> params)
           
protected  AccessTokenGrantHandler findGrantHandler(javax.ws.rs.core.MultivaluedMap<String,String> params)
          Find the matching grant handler
 List<String> getAudiences()
           
 javax.ws.rs.core.Response handleTokenRequest(javax.ws.rs.core.MultivaluedMap<String,String> params)
          Processes an access token request
 void setAudiences(List<String> audiences)
           
 void setGrantHandler(AccessTokenGrantHandler handler)
          Sets a grant handler
 void setGrantHandlers(List<AccessTokenGrantHandler> handlers)
          Sets the list of optional grant handlers
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.services.AbstractTokenService
authenticateClientIfNeeded, compareTlsCertificates, createErrorResponse, createErrorResponseFromBean, getAndValidateClientFromIdAndSecret, getClient, getClientFromBasicAuthScheme, getClientFromTLSCertificates, getClientIdFromTLSCertificates, handleException, isCanSupportPublicClients, reportInvalidClient, reportInvalidClient, setCanSupportPublicClients, setClientIdProvider, setWriteCustomErrors
 
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

AccessTokenService

public AccessTokenService()
Method Detail

setGrantHandlers

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

Parameters:
handlers - the grant handlers

setGrantHandler

public void setGrantHandler(AccessTokenGrantHandler handler)
Sets a grant handler

Parameters:
handler - the grant handler

handleTokenRequest

@POST
@Consumes(value="application/x-www-form-urlencoded")
@Produces(value="application/json")
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

checkAudience

protected void checkAudience(javax.ws.rs.core.MultivaluedMap<String,String> params)

findGrantHandler

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


getAudiences

public List<String> getAudiences()

setAudiences

public void setAudiences(List<String> audiences)

Apache CXF API

Apache CXF