Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.local
Class ClientLoginModule

java.lang.Object
  extended by org.nuxeo.ecm.core.api.local.ClientLoginModule
All Implemented Interfaces:
LoginModule

public class ClientLoginModule
extends Object
implements LoginModule

Author:
Bogdan Stefanescu

Constructor Summary
ClientLoginModule()
           
 
Method Summary
 boolean abort()
          Aborts the authentication process (phase 2).
 boolean commit()
          Commits the authentication process (phase 2).
 Principal createPrincipal(String name)
           
static LoginStack.Entry getCurrentLogin()
           
static LoginStack getThreadLocalLogin()
           
 void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
          Initialize this LoginModule.
 boolean login()
          Authenticates a Subject (phase 1).
 boolean logout()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientLoginModule

public ClientLoginModule()
Method Detail

getThreadLocalLogin

public static LoginStack getThreadLocalLogin()

getCurrentLogin

public static LoginStack.Entry getCurrentLogin()

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map sharedState,
                       Map options)
Initialize this LoginModule.

Specified by:
initialize in interface LoginModule

login

public boolean login()
              throws LoginException
Authenticates a Subject (phase 1).

Specified by:
login in interface LoginModule
Throws:
LoginException

commit

public boolean commit()
               throws LoginException
Commits the authentication process (phase 2).

This is where the SecurityAssociation information is set. The principal is obtained from: The shared state javax.security.auth.login.name property when useFirstPass is true. If the value is a Principal it is used as is, else a SimplePrincipal using the value.toString() as its name is used. If useFirstPass the username obtained from the callback handler is used to build the SimplePrincipal. Both may be overridden if the resulting authenticated Subject principals set it not empty.

Specified by:
commit in interface LoginModule
Throws:
LoginException

abort

public boolean abort()
              throws LoginException
Aborts the authentication process (phase 2).

Specified by:
abort in interface LoginModule
Throws:
LoginException

logout

public boolean logout()
               throws LoginException
Specified by:
logout in interface LoginModule
Throws:
LoginException

createPrincipal

public Principal createPrincipal(String name)
                          throws LoginException
Throws:
LoginException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.