Class AbstractOAuthService
java.lang.Object
org.apache.cxf.rs.security.oauth2.services.AbstractOAuthService
- Direct Known Subclasses:
AbstractTokenService,DirectAuthorizationService,RedirectionBasedGrantService
Abstract OAuth service
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidHTTPS is the default transport for OAuth 2.0 services.protected ClientgetValidClient(String clientId, jakarta.ws.rs.core.MultivaluedMap<String, String> params) Get theClientreferenceprotected ClientgetValidClient(String clientId, String clientSecret, jakarta.ws.rs.core.MultivaluedMap<String, String> params) protected voidbooleanprotected voidreportInvalidRequestError(String errorDescription) protected voidreportInvalidRequestError(String errorDescription, jakarta.ws.rs.core.MediaType mt) protected voidreportInvalidRequestError(OAuthError entity) protected voidreportInvalidRequestError(OAuthError entity, jakarta.ws.rs.core.MediaType mt) voidsetBlockUnsecureRequests(boolean blockUnsecureRequests) HTTPS is the default transport for OAuth 2.0 services, this property can be used to block all the requests issued over HTTPvoidsetDataProvider(OAuthDataProvider dataProvider) voidsetMessageContext(MessageContext context) voidsetWriteOptionalParameters(boolean write)
-
Field Details
-
LOG
-
-
Constructor Details
-
AbstractOAuthService
public AbstractOAuthService()
-
-
Method Details
-
setWriteOptionalParameters
public void setWriteOptionalParameters(boolean write) -
isWriteOptionalParameters
public boolean isWriteOptionalParameters() -
setMessageContext
-
injectContextIntoOAuthProviders
protected void injectContextIntoOAuthProviders() -
getMessageContext
-
setDataProvider
-
getDataProvider
-
getQueryParameters
-
getValidClient
protected Client getValidClient(String clientId, jakarta.ws.rs.core.MultivaluedMap<String, String> params) throws OAuthServiceExceptionGet theClientreference- Parameters:
clientId- the provided client id- Returns:
- Client the client reference
- Throws:
OAuthServiceException
-
getValidClient
protected Client getValidClient(String clientId, String clientSecret, jakarta.ws.rs.core.MultivaluedMap<String, String> params) throws OAuthServiceException- Throws:
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
-
reportInvalidRequestError
-
reportInvalidRequestError
-
reportInvalidRequestError
-
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
-