lumis.portal.authentication.http
Class SpnegoAuthenticator

Package class diagram package SpnegoAuthenticator
java.lang.Object
  extended by lumis.portal.authentication.http.HttpHandshakeAuthenticator
      extended by 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

Field Summary
 
Fields inherited from class lumis.portal.authentication.http.HttpHandshakeAuthenticator
ATTRIBUTE_STATE, STATE_AUTHENTICATED, STATE_FAILED, STATE_NONE, STATE_REQUESTED
 
Constructor Summary
SpnegoAuthenticator()
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpnegoAuthenticator

public SpnegoAuthenticator()
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 the HttpHandshakeAuthenticator.STATE_REQUESTED state. So this method implements the 'beginning' of the authentication.

Specified by:
requestAuthentication in class HttpHandshakeAuthenticator
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 is HttpHandshakeAuthenticator.STATE_REQUESTED. So this method implements the 'continuation' of the authentication, after it already began.

Specified by:
doAuthentication in class HttpHandshakeAuthenticator
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


Lumisportal  7.0.0.121130 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.