net.sf.jguard.authentication.loginmodules
Class CRLLoginModule

java.lang.Object
  extended by net.sf.jguard.authentication.loginmodules.CRLLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

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

validate certificates: validate their certPath and checks if some of them are revoked against CRL(Certificate Revocation list).

Author:
Charles Gay

Constructor Summary
CRLLoginModule()
           
 
Method Summary
 boolean abort()
           
protected static boolean certificateCommit(javax.security.auth.Subject subject, java.security.cert.X509Certificate[] certChain)
           
 boolean commit()
           
 void initialize(javax.security.auth.Subject subj, javax.security.auth.callback.CallbackHandler cbkHandler, java.util.Map state, java.util.Map options)
           
protected static boolean initSecurityProvider()
          install BouncyCastleProvider in the secuirty providers stack of the java platform.
 boolean login()
           
 boolean logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRLLoginModule

public CRLLoginModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subj,
                       javax.security.auth.callback.CallbackHandler cbkHandler,
                       java.util.Map state,
                       java.util.Map options)
Specified by:
initialize in interface javax.security.auth.spi.LoginModule
Parameters:
subj -
cbkHandler -
state -
options -
See Also:
LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)

login

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

commit

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

certificateCommit

protected static boolean certificateCommit(javax.security.auth.Subject subject,
                                           java.security.cert.X509Certificate[] certChain)
                                    throws javax.security.auth.login.LoginException
Throws:
javax.security.auth.login.LoginException

abort

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

logout

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

initSecurityProvider

protected static boolean initSecurityProvider()
install BouncyCastleProvider in the secuirty providers stack of the java platform.

Returns:
true if installation succeed, false otherwise