public abstract class AbstractOAuthService extends Object
Constructor and Description |
---|
AbstractOAuthService() |
Modifier and Type | Method and Description |
---|---|
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(String clientId,
javax.ws.rs.core.MultivaluedMap<String,String> params)
Get the
Client reference |
protected Client |
getValidClient(String clientId,
String clientSecret,
javax.ws.rs.core.MultivaluedMap<String,String> params) |
protected void |
injectContextIntoOAuthProviders() |
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) |
protected static final Logger LOG
public void setWriteOptionalParameters(boolean write)
public boolean isWriteOptionalParameters()
@Context public void setMessageContext(MessageContext context)
protected void injectContextIntoOAuthProviders()
public MessageContext getMessageContext()
public void setDataProvider(OAuthDataProvider dataProvider)
public OAuthDataProvider getDataProvider()
protected Client getValidClient(String clientId, javax.ws.rs.core.MultivaluedMap<String,String> params) throws OAuthServiceException
Client
referenceclientId
- the provided client id{@link
- OAuthServiceExcepption} if no matching Client is foundOAuthServiceException
protected Client getValidClient(String clientId, String clientSecret, javax.ws.rs.core.MultivaluedMap<String,String> params) throws OAuthServiceException
OAuthServiceException
protected void checkTransportSecurity()
protected void reportInvalidRequestError(String errorDescription)
protected void reportInvalidRequestError(String errorDescription, javax.ws.rs.core.MediaType mt)
protected void reportInvalidRequestError(OAuthError entity)
protected void reportInvalidRequestError(OAuthError entity, javax.ws.rs.core.MediaType mt)
public void setBlockUnsecureRequests(boolean blockUnsecureRequests)
blockUnsecureRequests
- if set to true then HTTP requests will be blockedApache CXF