Package lumis.portal.authentication.http
Class SpnegoAuthenticator
- java.lang.Object
-
- lumis.portal.authentication.http.HttpHandshakeAuthenticator
-
- lumis.portal.authentication.http.SpnegoAuthenticator
-
- All Implemented Interfaces:
IHttpAuthenticator
public class SpnegoAuthenticator extends HttpHandshakeAuthenticator
HTTP authenticator implementation that uses SPNEGO/Kerberos for authenticating the user accessing the portal.- Since:
- 7.0.0
- Version:
- $Revision: 16824 $ $Date: 2015-01-23 18:49:12 -0200 (Fri, 23 Jan 2015) $
-
-
Field Summary
-
Fields inherited from class lumis.portal.authentication.http.HttpHandshakeAuthenticator
ATTRIBUTE_STATE, STATE_AUTHENTICATED, STATE_FAILED, STATE_NONE, STATE_REQUESTED
-
-
Constructor Summary
Constructors Constructor Description SpnegoAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doAuthentication(HttpServletRequest request, HttpServletResponse response)
Perform the user authentication for the given request.protected String
getLoginModuleName()
Returns the login module name to use for SPNEGO authentication.protected void
requestAuthentication(HttpServletRequest request, HttpServletResponse response)
Request authentication from the browser.-
Methods inherited from class lumis.portal.authentication.http.HttpHandshakeAuthenticator
authenticate, getAuthenticationState, setAuthenticationState, shouldTryToAuthenticateOnlyOncePerSession
-
-
-
-
Method Detail
-
requestAuthentication
protected void requestAuthentication(HttpServletRequest request, HttpServletResponse response) throws PortalException
Description copied from class:HttpHandshakeAuthenticator
Request authentication from the browser. The response must be set as necessary so the browser will respond with the necessary authentication information in its next request.This method is called by
HttpHandshakeAuthenticator.authenticate(HttpServletRequest, HttpServletResponse)
when an authentication is necessary but it is not in theHttpHandshakeAuthenticator.STATE_REQUESTED
state. So this method implements the 'beginning' of the authentication.- Specified by:
requestAuthentication
in classHttpHandshakeAuthenticator
- Parameters:
request
- the http request.response
- the http response.- Throws:
PortalException
-
doAuthentication
protected String doAuthentication(HttpServletRequest request, HttpServletResponse response) throws PortalException, ContinueOnNextRequestException
Description copied from class:HttpHandshakeAuthenticator
Perform the user authentication for the given request.This method is called by
HttpHandshakeAuthenticator.authenticate(HttpServletRequest, HttpServletResponse)
when the current state isHttpHandshakeAuthenticator.STATE_REQUESTED
. So this method implements the 'continuation' of the authentication, after it already began.- Specified by:
doAuthentication
in classHttpHandshakeAuthenticator
- Parameters:
request
- the http request.response
- the http response.- Returns:
- the userId of the authenticated user, or null if the authentication failed.
- Throws:
PortalException
ContinueOnNextRequestException
- if the authentication is not complete and will continue on next request. This is useful when more requests are necessary to complete the authentication.
-
getLoginModuleName
protected String getLoginModuleName()
Returns the login module name to use for SPNEGO authentication.- Returns:
- the login module name.
- Since:
- 7.0.0
-
-