Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.jaxrs.login
Class CompositeAuthenticationHandler

java.lang.Object
  extended by org.nuxeo.ecm.webengine.jaxrs.login.CompositeAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler

public class CompositeAuthenticationHandler
extends Object
implements AuthenticationHandler

An authentication handlers that delegate the authentication to the first registered handler that knows how to authenticate.

Author:
Bogdan Stefanescu

Constructor Summary
CompositeAuthenticationHandler(AuthenticationHandler[] handlers)
           
CompositeAuthenticationHandler(String classRefs)
           
 
Method Summary
 LoginContext handleAuthentication(HttpServletRequest request, HttpServletResponse response)
          Handle the authentication if the request contains any known authentication data.
 void init(Map<String,String> properties)
          Initialize this handler given a property map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeAuthenticationHandler

public CompositeAuthenticationHandler(String classRefs)
                               throws Exception
Throws:
Exception

CompositeAuthenticationHandler

public CompositeAuthenticationHandler(AuthenticationHandler[] handlers)
Method Detail

init

public void init(Map<String,String> properties)
Description copied from interface: AuthenticationHandler
Initialize this handler given a property map.

Specified by:
init in interface AuthenticationHandler

handleAuthentication

public LoginContext handleAuthentication(HttpServletRequest request,
                                         HttpServletResponse response)
                                  throws LoginException
Description copied from interface: AuthenticationHandler
Handle the authentication if the request contains any known authentication data. If authentication was done returns the resulting LoginContext otherwise returns null. If authentication failed throws LoginException and the implementation must finish the request by correctly responding to the client or redirecting to another page - through the given response object.

Specified by:
handleAuthentication in interface AuthenticationHandler
Parameters:
request - the http request
response - the http response
Returns:
the loginc context if successful, or null if login was not handled.
Throws:
LoginException - if authentication failed.

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.