org.openmdx.security.auth.login
Class RemoteLoginModule

java.lang.Object
  extended by org.openmdx.security.auth.login.RemoteLoginModule
All Implemented Interfaces:
LoginModule

public class RemoteLoginModule
extends Object
implements LoginModule

The remote authenticator's login module implementation.


Constructor Summary
RemoteLoginModule()
           
 
Method Summary
 boolean abort()
          Aborts the login attempt.
 boolean commit()
          Completes the login by adding the user and the user's groups to the subject.
 void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
          Initialize a login attempt.
 boolean login()
          Attempt to login.
 boolean logout()
          Logout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteLoginModule

public RemoteLoginModule()
Method Detail

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map sharedState,
                       Map options)
Initialize a login attempt.

Specified by:
initialize in interface LoginModule
Parameters:
subject - the Subject this login attempt will populate.
callbackhandler - the CallbackHandler that can be used to get the user name, and in authentication mode, the user's password
sharedState - A Map containing data shared between login modules when there are multiple authenticators configured.
RemoteLoginModule does not use this parameter.
options - A Map containing options that the authenticator's authentication provider impl wants to pass to its login module impl.
  • "org.openmdx.security.realm1.cci.Realm": (mandatory) The realm's object id, i.e. "xri://@openmdx*org.openmdx.secuyrity.realm1/provider/‹provider name›/segment/‹sement name›/realm/‹realm name›
  • "javax.jdo.PersistenceManagerFactory": (mandatory) A JDO persistence manager factory instance.
  • "javax.security.auth.callback.NameCallback.prompt": (optional) The prompt to be used by the javax.security.auth.callback.NameCallback
  • "javax.security.auth.callback.PasswordCallback.prompt": (optional) The prompt to be used by the javax.security.auth.callback.PasswordCallback supporting the following placeholders
    • ${name} The NameCallback's name
    • ${challenge} The credential's challenge
  • "javax.security.auth.callback.TextOutputCallback.realm": (optional) The prompt to be used by the javax.security.auth.callback.TextOutputCallback for realm information supporting the following placeholders
    • ${realm.id} The realm path's base name
    • ${realm.xri} The realm path's XRI
  • "javax.security.auth.callback.PasswordCallback.echoOn": (optional) one of
    • a java.lang.Boolean telling whether the javax.security.auth.callback.PasswordCallback's echo is to be switched on or not
    • a java.utilSet of org.openmdx.security.realm1.cci.ValidationResult codes requiring their javax.security.auth.callback.PasswordCallback's echo to be switched on
Throws:
NullPointerException - if one of the following options is missing
  • "org.openmdx.security.realm1.cci.Realm"
  • "javax.jdo.PersistenceManagerFactory"

login

public boolean login()
              throws LoginException
Attempt to login.

Specified by:
login in interface LoginModule
Returns:
A boolean indicating whether or not the login for this login module succeeded.
Throws:
LoginException

commit

public boolean commit()
               throws LoginException
Completes the login by adding the user and the user's groups to the subject.

Specified by:
commit in interface LoginModule
Returns:
A boolean indicating whether or not the commit succeeded.
Throws:
LoginException

abort

public boolean abort()
              throws LoginException
Aborts the login attempt. Remove any principals we put into the subject during the commit method from the subject.

Specified by:
abort in interface LoginModule
Returns:
A boolean indicating whether or not the abort succeeded.
Throws:
LoginException

logout

public boolean logout()
               throws LoginException
Logout. This should never be called.

Specified by:
logout in interface LoginModule
Returns:
A boolean indicating whether or not the logout succeeded.
Throws:
LoginException


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.