|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.auth.core.impl.SlingAuthenticator
@Services(value={@Service(value=Authenticator.class),@Service(value=AuthenticationSupport.class),@Service(value=javax.servlet.ServletRequestListener.class)}) @Property(name="service.vendor", value="The Apache Software Foundation") public class SlingAuthenticator
The SlingAuthenticator
class is the default implementation for
handling authentication. This class supports :
AuthenticationHandler
interface.
Currently this class does not support multiple handlers for any one request URL.
Field Summary | |
---|---|
static String |
PAR_ANONYMOUS_ALLOWED
|
static String |
PAR_IMPERSONATION_COOKIE_NAME
|
static String |
PAR_IMPERSONATION_PAR_NAME
|
static String |
PAR_REALM_NAME
The name of the configuration property used to set the Realm of the built-in HTTP Basic authentication handler. |
Fields inherited from interface org.apache.sling.api.auth.Authenticator |
---|
LOGIN_RESOURCE, SERVICE_NAME |
Fields inherited from interface org.apache.sling.auth.core.AuthenticationSupport |
---|
REDIRECT_PARAMETER, REQUEST_ATTRIBUTE_RESOLVER, SERVICE_NAME |
Constructor Summary | |
---|---|
SlingAuthenticator()
|
Method Summary | |
---|---|
boolean |
handleSecurity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Checks the authentication contained in the request. |
void |
login(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Requests authentication information from the client. |
void |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Logs out the user calling all applicable AuthenticationHandler
authentication handlers. |
void |
requestDestroyed(javax.servlet.ServletRequestEvent sre)
|
void |
requestInitialized(javax.servlet.ServletRequestEvent sre)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Property(value="sling.sudo") public static final String PAR_IMPERSONATION_COOKIE_NAME
@Property(value="sudo") public static final String PAR_IMPERSONATION_PAR_NAME
@Property(boolValue=true) public static final String PAR_ANONYMOUS_ALLOWED
@Property(value="Sling (Development)") public static final String PAR_REALM_NAME
Constructor Detail |
---|
public SlingAuthenticator()
Method Detail |
---|
public boolean handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
handleSecurity
in interface AuthenticationSupport
request
- The request object containing the information for the
authentication.response
- The response object which may be used to send the
information on the request failure to the user.
true
if request processing should continue assuming
successfull authentication. If false
is returned it
is assumed a response has been sent to the client and the request
is terminated.public void login(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
true
if the information has been requested and request
processing can be terminated. Otherwise the request information could not
be requested and the request should be terminated with a 403/FORBIDDEN
response.
Any response sent by the handler is also handled by the error handler infrastructure.
login
in interface Authenticator
request
- The request objectresponse
- The response object to which to send the request
IllegalStateException
- If response is already committed
NoAuthenticationHandlerException
- If no authentication handler
claims responsibility to authenticate the request.public void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
AuthenticationHandler
authentication handlers.
logout
in interface Authenticator
request
- The object representing the client request.response
- The object representing the response to the client.public void requestInitialized(javax.servlet.ServletRequestEvent sre)
requestInitialized
in interface javax.servlet.ServletRequestListener
public void requestDestroyed(javax.servlet.ServletRequestEvent sre)
requestDestroyed
in interface javax.servlet.ServletRequestListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |