public abstract class AbstractAuthenticationHandlerHolder extends PathBasedHolder implements AuthenticationHandler
AbstractAuthenticationHandlerHolder is a base class to
represent authentication handlers (both legacy and new ones) for use in the
SlingAuthenticator.AuthenticationHandler.FAILURE_REASON_CODESfullPathFAILURE_REASON, FAILURE_REASON_CODE, PATH_PROPERTY, REQUEST_LOGIN_PARAMETER, SERVICE_NAME, TYPE_PROPERTY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuthenticationHandlerHolder(String fullPath,
org.osgi.framework.ServiceReference serviceReference) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doDropCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Calls the actual authentication handler to request the credentials from
the client.
|
protected abstract AuthenticationInfo |
doExtractCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Calls the actual authentication handler to extract the credentials from
the request.
|
protected abstract boolean |
doRequestCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Calls the actual authentication handler to request the credentials from
the client.
|
void |
dropCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the
AuthenticationHandler.PATH_PROPERTY request attribute to
this PathBasedHolder.fullPath and calls the
doDropCredentials(HttpServletRequest, HttpServletResponse) to
have the credentials dropped by the held authentication handler. |
AuthenticationInfo |
extractCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the
AuthenticationHandler.PATH_PROPERTY request attribute to
this PathBasedHolder.fullPath and calls the
extractCredentials(HttpServletRequest, HttpServletResponse) to
have the credentials extracted from the request. |
protected abstract AuthenticationFeedbackHandler |
getFeedbackHandler()
Returns a feedback handler provided by the authentication handler held by
this instance or
null if none is provided. |
boolean |
requestCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets the
AuthenticationHandler.PATH_PROPERTY request attribute to
this PathBasedHolder.fullPath and calls the
doRequestCredentials(HttpServletRequest, HttpServletResponse) to
have the credentials requested from the client. |
compareTo, equals, hashCodeprotected AbstractAuthenticationHandlerHolder(String fullPath, org.osgi.framework.ServiceReference serviceReference)
public final AuthenticationInfo extractCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
AuthenticationHandler.PATH_PROPERTY request attribute to
this PathBasedHolder.fullPath and calls the
extractCredentials(HttpServletRequest, HttpServletResponse) to
have the credentials extracted from the request.extractCredentials in interface AuthenticationHandlerrequest - the current requestresponse - the current responsedoExtractCredentials(HttpServletRequest, HttpServletResponse)public final boolean requestCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
AuthenticationHandler.PATH_PROPERTY request attribute to
this PathBasedHolder.fullPath and calls the
doRequestCredentials(HttpServletRequest, HttpServletResponse) to
have the credentials requested from the client.requestCredentials in interface AuthenticationHandlerrequest - the current requestresponse - the current responsedoRequestCredentials(HttpServletRequest, HttpServletResponse)IOException - if an error occurs interacting with the clientpublic final void dropCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
AuthenticationHandler.PATH_PROPERTY request attribute to
this PathBasedHolder.fullPath and calls the
doDropCredentials(HttpServletRequest, HttpServletResponse) to
have the credentials dropped by the held authentication handler.dropCredentials in interface AuthenticationHandlerrequest - the current requestresponse - the current responseIOException - if an error occurs interacting with the clientprotected abstract AuthenticationFeedbackHandler getFeedbackHandler()
null if none is provided.protected abstract AuthenticationInfo doExtractCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request - The current requestresponse - The current responseextractCredentials(HttpServletRequest, HttpServletResponse)protected abstract boolean doRequestCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
request - The current requestresponse - The current responseIOException - if an error occurs sending back any response to the
client.requestCredentials(HttpServletRequest, HttpServletResponse)protected abstract void doDropCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
request - The current requestresponse - The current responseIOException - if an error occurs sending back any response to the
client.dropCredentials(HttpServletRequest, HttpServletResponse)Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.