org.apache.cxf.rs.security.oauth2.services
Class AbstractTokenService
java.lang.Object
org.apache.cxf.rs.security.oauth2.services.AbstractOAuthService
org.apache.cxf.rs.security.oauth2.services.AbstractTokenService
- Direct Known Subclasses:
- AccessTokenService, TokenRevocationService
public class AbstractTokenService
- extends AbstractOAuthService
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 |
AbstractTokenService
public AbstractTokenService()
authenticateClientIfNeeded
protected Client authenticateClientIfNeeded(javax.ws.rs.core.MultivaluedMap<String,String> params)
- Make sure the client is authenticated
getAndValidateClientFromIdAndSecret
protected Client getAndValidateClientFromIdAndSecret(String clientId,
String clientSecret)
getClientFromBasicAuthScheme
protected Client getClientFromBasicAuthScheme()
getClientFromTLSCertificates
protected Client getClientFromTLSCertificates(javax.ws.rs.core.SecurityContext sc,
TLSSessionInfo tlsSessionInfo)
getClientIdFromTLSCertificates
protected String getClientIdFromTLSCertificates(javax.ws.rs.core.SecurityContext sc,
TLSSessionInfo tlsInfo)
compareTlsCertificates
protected void compareTlsCertificates(TLSSessionInfo tlsInfo,
String base64EncodedCert)
handleException
protected javax.ws.rs.core.Response handleException(OAuthServiceException ex,
String error)
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)
getClient
protected Client getClient(String clientId)
- Get the
Client
reference
- Parameters:
clientId
- the provided client id
- Returns:
- Client the client reference
- Throws:
{@link
- javax.ws.rs.WebApplicationException} if no matching Client is found
reportInvalidClient
protected void reportInvalidClient()
reportInvalidClient
protected void reportInvalidClient(OAuthError error)
setCanSupportPublicClients
public void setCanSupportPublicClients(boolean support)
isCanSupportPublicClients
public boolean isCanSupportPublicClients()
setWriteCustomErrors
public void setWriteCustomErrors(boolean writeCustomErrors)
setClientIdProvider
public void setClientIdProvider(ClientIdProvider clientIdProvider)
Apache CXF