Apache CXF API

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

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.services.AbstractOAuthService
Direct Known Subclasses:
AbstractTokenService, RedirectionBasedGrantService

public abstract class AbstractOAuthService
extends Object

Abstract OAuth service


Constructor Summary
AbstractOAuthService()
           
 
Method Summary
protected  void checkTransportSecurity()
          HTTPS is the default transport for OAuth 2.0 services.
 OAuthDataProvider getDataProvider()
           
 MessageContext getMessageContext()
           
protected  javax.ws.rs.core.MultivaluedMap<String,String> getQueryParameters()
           
protected  Client getValidClient(javax.ws.rs.core.MultivaluedMap<String,String> params)
           
protected  Client getValidClient(String clientId)
          Get the Client reference
 boolean isWriteOptionalParameters()
           
protected  void reportInvalidRequestError(OAuthError entity)
           
protected  void reportInvalidRequestError(OAuthError entity, javax.ws.rs.core.MediaType mt)
           
protected  void reportInvalidRequestError(String errorDescription)
           
protected  void reportInvalidRequestError(String errorDescription, javax.ws.rs.core.MediaType mt)
           
 void setBlockUnsecureRequests(boolean blockUnsecureRequests)
          HTTPS is the default transport for OAuth 2.0 services, this property can be used to block all the requests issued over HTTP
 void setDataProvider(OAuthDataProvider dataProvider)
           
 void setMessageContext(MessageContext context)
           
 void setWriteOptionalParameters(boolean write)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractOAuthService

public AbstractOAuthService()
Method Detail

setWriteOptionalParameters

public void setWriteOptionalParameters(boolean write)

isWriteOptionalParameters

public boolean isWriteOptionalParameters()

setMessageContext

@Context
public void setMessageContext(MessageContext context)

getMessageContext

public MessageContext getMessageContext()

setDataProvider

public void setDataProvider(OAuthDataProvider dataProvider)

getDataProvider

public OAuthDataProvider getDataProvider()

getQueryParameters

protected javax.ws.rs.core.MultivaluedMap<String,String> getQueryParameters()

getValidClient

protected Client getValidClient(javax.ws.rs.core.MultivaluedMap<String,String> params)

getValidClient

protected Client getValidClient(String clientId)
                         throws OAuthServiceException
Get the Client reference

Parameters:
clientId - the provided client id
Returns:
Client the client reference
Throws:
{@link - OAuthServiceExcepption} if no matching Client is found
OAuthServiceException

checkTransportSecurity

protected void checkTransportSecurity()
HTTPS is the default transport for OAuth 2.0 services. By default this method will issue a warning for open endpoints


reportInvalidRequestError

protected void reportInvalidRequestError(String errorDescription)

reportInvalidRequestError

protected void reportInvalidRequestError(String errorDescription,
                                         javax.ws.rs.core.MediaType mt)

reportInvalidRequestError

protected void reportInvalidRequestError(OAuthError entity)

reportInvalidRequestError

protected void reportInvalidRequestError(OAuthError entity,
                                         javax.ws.rs.core.MediaType mt)

setBlockUnsecureRequests

public void setBlockUnsecureRequests(boolean blockUnsecureRequests)
HTTPS is the default transport for OAuth 2.0 services, this property can be used to block all the requests issued over HTTP

Parameters:
blockUnsecureRequests - if set to true then HTTP requests will be blocked

Apache CXF API

Apache CXF