public class AbstractTokenService extends AbstractOAuthService
LOG
Constructor and Description |
---|
AbstractTokenService() |
Modifier and Type | Method and Description |
---|---|
protected Client |
authenticateClientIfNeeded(javax.ws.rs.core.MultivaluedMap<String,String> params)
Make sure the client is authenticated
|
protected void |
checkCertificateBinding(Client client,
TLSSessionInfo tlsSessionInfo) |
protected void |
compareTlsCertificates(TLSSessionInfo tlsInfo,
List<String> base64EncodedCerts) |
protected javax.ws.rs.core.Response |
createErrorResponse(javax.ws.rs.core.MultivaluedMap<String,String> params,
String error) |
protected javax.ws.rs.core.Response |
createErrorResponseFromBean(OAuthError errorBean) |
protected javax.ws.rs.core.Response |
createErrorResponseFromErrorCode(String error) |
protected Client |
getAndValidateClientFromIdAndSecret(String clientId,
String providedClientSecret,
javax.ws.rs.core.MultivaluedMap<String,String> params) |
protected Client |
getClient(String clientId,
javax.ws.rs.core.MultivaluedMap<String,String> params)
Get the
Client reference |
protected Client |
getClient(String clientId,
String clientSecret,
javax.ws.rs.core.MultivaluedMap<String,String> params) |
protected Client |
getClientFromBasicAuthScheme(javax.ws.rs.core.MultivaluedMap<String,String> params) |
protected Client |
getClientFromTLSCertificates(javax.ws.rs.core.SecurityContext sc,
TLSSessionInfo tlsSessionInfo,
javax.ws.rs.core.MultivaluedMap<String,String> params) |
protected javax.ws.rs.core.Response |
handleException(OAuthServiceException ex,
String error) |
boolean |
isCanSupportPublicClients() |
protected boolean |
isConfidenatialClientSecretValid(Client client,
String providedClientSecret) |
protected boolean |
isValidPublicClient(Client client,
String clientId) |
protected void |
reportInvalidClient() |
protected void |
reportInvalidClient(OAuthError error) |
protected String |
retrieveClientId(javax.ws.rs.core.MultivaluedMap<String,String> params) |
void |
setCanSupportPublicClients(boolean support) |
void |
setClientIdProvider(ClientIdProvider clientIdProvider) |
void |
setClientSecretVerifier(ClientSecretVerifier clientSecretVerifier) |
void |
setWriteCustomErrors(boolean writeCustomErrors) |
protected void |
validateClientAuthenticationMethod(Client c,
String authMethod) |
checkTransportSecurity, getDataProvider, getMessageContext, getQueryParameters, getValidClient, getValidClient, injectContextIntoOAuthProviders, isWriteOptionalParameters, reportInvalidRequestError, reportInvalidRequestError, reportInvalidRequestError, reportInvalidRequestError, setBlockUnsecureRequests, setDataProvider, setMessageContext, setWriteOptionalParameters
protected Client authenticateClientIfNeeded(javax.ws.rs.core.MultivaluedMap<String,String> params)
protected void validateClientAuthenticationMethod(Client c, String authMethod)
protected String retrieveClientId(javax.ws.rs.core.MultivaluedMap<String,String> params)
protected Client getAndValidateClientFromIdAndSecret(String clientId, String providedClientSecret, javax.ws.rs.core.MultivaluedMap<String,String> params)
protected boolean isConfidenatialClientSecretValid(Client client, String providedClientSecret)
protected Client getClientFromBasicAuthScheme(javax.ws.rs.core.MultivaluedMap<String,String> params)
protected void checkCertificateBinding(Client client, TLSSessionInfo tlsSessionInfo)
protected Client getClientFromTLSCertificates(javax.ws.rs.core.SecurityContext sc, TLSSessionInfo tlsSessionInfo, javax.ws.rs.core.MultivaluedMap<String,String> params)
protected void compareTlsCertificates(TLSSessionInfo tlsInfo, List<String> base64EncodedCerts)
protected javax.ws.rs.core.Response handleException(OAuthServiceException ex, String error)
protected javax.ws.rs.core.Response createErrorResponse(javax.ws.rs.core.MultivaluedMap<String,String> params, String error)
protected javax.ws.rs.core.Response createErrorResponseFromErrorCode(String error)
protected javax.ws.rs.core.Response createErrorResponseFromBean(OAuthError errorBean)
protected Client getClient(String clientId, javax.ws.rs.core.MultivaluedMap<String,String> params)
Client
referenceclientId
- the provided client id{@link
- javax.ws.rs.WebApplicationException} if no matching Client is foundprotected Client getClient(String clientId, String clientSecret, javax.ws.rs.core.MultivaluedMap<String,String> params)
protected void reportInvalidClient()
protected void reportInvalidClient(OAuthError error)
public void setCanSupportPublicClients(boolean support)
public boolean isCanSupportPublicClients()
public void setWriteCustomErrors(boolean writeCustomErrors)
public void setClientIdProvider(ClientIdProvider clientIdProvider)
public void setClientSecretVerifier(ClientSecretVerifier clientSecretVerifier)
Apache CXF