|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.auth.core.impl.PathBasedHolder
org.apache.sling.auth.core.impl.AbstractAuthenticationHandlerHolder
public abstract class AbstractAuthenticationHandlerHolder
The AbstractAuthenticationHandlerHolder
is a base class to
represent authentication handlers (both legacy and new ones) for use in the
SlingAuthenticator
.
Field Summary |
---|
Fields inherited from class org.apache.sling.auth.core.impl.PathBasedHolder |
---|
fullPath |
Fields inherited from interface org.apache.sling.auth.core.spi.AuthenticationHandler |
---|
FAILURE_REASON, PATH_PROPERTY, REQUEST_LOGIN_PARAMETER, SERVICE_NAME, TYPE_PROPERTY |
Constructor Summary | |
---|---|
protected |
AbstractAuthenticationHandlerHolder(String fullPath,
org.osgi.framework.ServiceReference serviceReference)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.sling.auth.core.impl.PathBasedHolder |
---|
compareTo, equals, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractAuthenticationHandlerHolder(String fullPath, org.osgi.framework.ServiceReference serviceReference)
Method Detail |
---|
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 AuthenticationHandler
request
- the current requestresponse
- the current response
AuthenticationInfo
instance identifying the
request user, AuthenticationInfo.DOING_AUTH
if the
handler is in an authentication transaction with the client or
null if the request does not contain authentication information.
In case of AuthenticationInfo.DOING_AUTH
, the method must
have sent a response indicating that fact to the client.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 AuthenticationHandler
request
- the current requestresponse
- the current response
true
if the handler is able to send an authentication
inquiry for the given request. false
otherwise.
IOException
- if an error occurrs 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 AuthenticationHandler
request
- the current requestresponse
- the current response
IOException
- if an error occurrs 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 response
extractCredentials(HttpServletRequest, HttpServletResponse)
protected abstract boolean doRequestCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
request
- The current requestresponse
- The current response
IOException
- if an error occurrs 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 response
IOException
- if an error occurrs sending back any response to the
client.dropCredentials(HttpServletRequest, HttpServletResponse)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |