public abstract class AbstractTokenAuthenticator extends Object implements TokenAuthenticator
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.client.CloseableHttpClient |
httpClient |
protected OAuth2ServiceConfiguration |
serviceConfiguration |
| Constructor and Description |
|---|
AbstractTokenAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
protected TokenAuthenticationResult |
authenticated(Token token) |
protected abstract Token |
extractFromHeader(String authorizationHeader)
Extracts the
Token from the authorization header. |
protected abstract OAuth2ServiceConfiguration |
getServiceConfiguration()
Return configured service configuration or Environments.getCurrent() if not
configured.
|
TokenAuthenticationResult |
validateRequest(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
AbstractTokenAuthenticator |
withHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
AbstractTokenAuthenticator |
withServiceConfiguration(OAuth2ServiceConfiguration serviceConfiguration) |
AbstractTokenAuthenticator |
withValidationListener(ValidationListener validationListener)
Adds the validation listener to the jwt validator that is being used by the
authenticator to validate the tokens.
|
protected org.apache.http.impl.client.CloseableHttpClient httpClient
protected OAuth2ServiceConfiguration serviceConfiguration
public TokenAuthenticationResult validateRequest(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
validateRequest in interface TokenAuthenticatorpublic AbstractTokenAuthenticator withHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
public AbstractTokenAuthenticator withServiceConfiguration(OAuth2ServiceConfiguration serviceConfiguration)
public AbstractTokenAuthenticator withValidationListener(ValidationListener validationListener)
validationListener - the listener to be added.protected abstract OAuth2ServiceConfiguration getServiceConfiguration()
IllegalStateException - in case service configuration is nullprotected abstract Token extractFromHeader(String authorizationHeader)
Token from the authorization header.authorizationHeader - the value of the 'Authorization' request headerToken instance.protected TokenAuthenticationResult authenticated(Token token)
Copyright © 2020. All rights reserved.