public class BasicAuthenticationHandler extends AbstractAuthenticationHandler implements SharepointConstants
BASIC web authentication implementation.
Modifier and Type | Field and Description |
---|---|
protected AuthenticationComponent |
authenticationComponent |
protected RemoteUserMapper |
remoteUserMapper |
authenticationService, logger, personService
USER_SESSION_ATTRIBUTE
AUTHENTICATION_USER
Constructor and Description |
---|
BasicAuthenticationHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
authenticateRequest(ServletContext context,
HttpServletRequest request,
HttpServletResponse response)
Authenticate user based on information in http request such as Authorization header or cached session
information.
|
String |
getWWWAuthenticate()
Returns the value of 'WWW-Authenticate' http header that determine what type of authentication to use by
client.
|
boolean |
isUserAuthenticated(ServletContext context,
HttpServletRequest request)
Returns
true if the user is authenticated and their details are cached in the session |
void |
setAuthenticationComponent(AuthenticationComponent authenticationComponent) |
void |
setAuthenticationListener(AuthenticationListener authenticationListener)
Set the authentication listener
|
void |
setRemoteUserMapper(RemoteUserMapper remoteUserMapper) |
isActive, restartLoginChallenge, setActive, setAuthenticationService, setPersonService
protected RemoteUserMapper remoteUserMapper
protected AuthenticationComponent authenticationComponent
public void setAuthenticationListener(AuthenticationListener authenticationListener)
public boolean authenticateRequest(ServletContext context, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
AuthenticationDriver
authenticateRequest
in interface AuthenticationDriver
context
- the contextrequest
- http requestresponse
- http responsetrue
if authentication was successfulIOException
ServletException
public boolean isUserAuthenticated(ServletContext context, HttpServletRequest request) throws IOException, ServletException
true
if the user is authenticated and their details are cached in the sessioncontext
- the servlet contextrequest
- the servlet requesttrue
, if the user is authenticatedIOException
- Signals that an I/O exception has occurred.ServletException
- On other errors.public String getWWWAuthenticate()
AbstractAuthenticationHandler
getWWWAuthenticate
in class AbstractAuthenticationHandler
public void setRemoteUserMapper(RemoteUserMapper remoteUserMapper)
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
Copyright © 2005–2017 Alfresco Software. All rights reserved.