net.sf.jguard.loginmodules
Class XmlLoginModule

java.lang.Object
  extended bynet.sf.jguard.loginmodules.XmlLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class XmlLoginModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule

LoginModule configured by the jGuardUsersRoles XML file.

Author:
Charles Gay

Constructor Summary
XmlLoginModule()
           
 
Method Summary
 boolean abort()
          remove Principals and Public/Private Credentials from Subject.
 boolean commit()
          add Principals and Public/Private credentials to Subject.
 void initialize(javax.security.auth.Subject subj, javax.security.auth.callback.CallbackHandler cbkHandler, java.util.Map sState, java.util.Map opts)
          initialize the loginModule.
 boolean login()
          Authenticate the user.
 boolean logout()
          remove Principals and Private/Public credentials from Subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlLoginModule

public XmlLoginModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subj,
                       javax.security.auth.callback.CallbackHandler cbkHandler,
                       java.util.Map sState,
                       java.util.Map opts)
initialize the loginModule.

Specified by:
initialize in interface javax.security.auth.spi.LoginModule

login

public boolean login()
              throws javax.security.auth.login.LoginException
Authenticate the user.

Specified by:
login in interface javax.security.auth.spi.LoginModule
Returns:
true if the user is authenticated, false otherwise.
Throws:
javax.security.auth.login.FailedLoginException - authentication fails
javax.security.auth.login.LoginException - if this LoginModule is unable to perform the authentication.

abort

public boolean abort()
              throws javax.security.auth.login.LoginException
remove Principals and Public/Private Credentials from Subject.

Specified by:
abort in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException
See Also:
LoginModule.abort()

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
add Principals and Public/Private credentials to Subject.

Specified by:
commit in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException
See Also:
LoginModule.commit()

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
remove Principals and Private/Public credentials from Subject.

Specified by:
logout in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException
See Also:
LoginModule.logout()