lumis.portal.authentication.http
Class NtlmAuthenticator

Package class diagram package NtlmAuthenticator
java.lang.Object
  extended by lumis.portal.authentication.http.HttpHandshakeAuthenticator
      extended by lumis.portal.authentication.http.NtlmAuthenticator
All Implemented Interfaces:
IHttpAuthenticator

public class NtlmAuthenticator
extends HttpHandshakeAuthenticator

Authenticator that implements NTLM authentication.

To use this authenticator, configure the portal to use this class as its IHttpAuthenticator implementation, and configure the NtlmFilter in the web application.

Since:
4.0.10
See Also:
lumis.portal.authentication.http, NtlmFilter

Field Summary
 
Fields inherited from class lumis.portal.authentication.http.HttpHandshakeAuthenticator
ATTRIBUTE_STATE, STATE_AUTHENTICATED, STATE_FAILED, STATE_NONE, STATE_REQUESTED
 
Constructor Summary
NtlmAuthenticator()
           
 
Method Summary
protected  String doAuthentication(HttpServletRequest request, HttpServletResponse response)
          Do the authentication using the NTLM negotiation result.
protected  String getAuthenticatedLoginUserId(String login)
          Returns the userId for the authenticated login.
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

NtlmAuthenticator

public NtlmAuthenticator()
Method Detail

getAuthenticatedLoginUserId

protected String getAuthenticatedLoginUserId(String login)
                                      throws PortalException
Returns the userId for the authenticated login.

Parameters:
login - the login.
Returns:
the userId, or null if the login is not to be considered authenticated.
Throws:
PortalException
Since:
4.0.10

doAuthentication

protected String doAuthentication(HttpServletRequest request,
                                  HttpServletResponse response)
                           throws PortalException,
                                  ContinueOnNextRequestException
Do the authentication using the NTLM negotiation result. The authenticated login is converted into an user id by calling the getAuthenticatedLoginUserId(String) method.

Specified by:
doAuthentication in class HttpHandshakeAuthenticator
Parameters:
request - the http request.
response - the http response.
Returns:
the authenticated user's login if the authentication was sucessful, or null if he could not be authenticated.
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.
Since:
4.0.10

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


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