public abstract class AbstractPKIHandler extends Object implements AuthenticationHandler
Modifier and Type | Field and Description |
---|---|
protected CrlChecker |
crlChecker |
protected static org.slf4j.Logger |
LOGGER |
static String |
SOURCE |
protected PKIAuthenticationTokenFactory |
tokenFactory |
Constructor and Description |
---|
AbstractPKIHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract BaseAuthenticationToken |
extractAuthenticationInfo(String realm,
X509Certificate[] certs) |
abstract String |
getAuthenticationType()
Authentication type String used to match this handler with the auth types configured for a
specific context.
|
HandlerResult |
getNormalizedToken(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain,
boolean resolve)
Handler implementing PKI authentication.
|
HandlerResult |
handleError(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain chain)
Called when downstream authentication fails.
|
void |
setTokenFactory(PKIAuthenticationTokenFactory factory) |
public static final String SOURCE
protected static final org.slf4j.Logger LOGGER
protected PKIAuthenticationTokenFactory tokenFactory
protected CrlChecker crlChecker
public abstract String getAuthenticationType()
AuthenticationHandler
getAuthenticationType
in interface AuthenticationHandler
public HandlerResult getNormalizedToken(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain, boolean resolve) throws javax.servlet.ServletException
HandlerResult
containing a BinarySecurityToken if the
operation was successful.getNormalizedToken
in interface AuthenticationHandler
request
- http request to obtain attributes from and to pass into any local filter chains
requiredresponse
- http response to return http responses or redirectschain
- original filter chain (should not be called from your handler)resolve
- flag with true implying that credentials should be obtained, false implying
return if no credentials are found.javax.servlet.ServletException
public HandlerResult handleError(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain) throws javax.servlet.ServletException
AuthenticationHandler
handleError
in interface AuthenticationHandler
servletRequest
- htt http response to return http responses or redirectsjavax.servlet.ServletException
protected abstract BaseAuthenticationToken extractAuthenticationInfo(String realm, X509Certificate[] certs)
public void setTokenFactory(PKIAuthenticationTokenFactory factory)
This work is licensed under a Creative Commons Attribution 4.0 International License.