org.ldaptive.jaas
Class LdapLoginModule

java.lang.Object
  extended by org.ldaptive.jaas.AbstractLoginModule
      extended by org.ldaptive.jaas.LdapLoginModule
All Implemented Interfaces:
LoginModule

public class LdapLoginModule
extends AbstractLoginModule

Provides a JAAS authentication hook for LDAP authentication.

Version:
$Revision: 2904 $ $Date: 2014-03-14 12:15:20 -0400 (Fri, 14 Mar 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.jaas.AbstractLoginModule
callbackHandler, clearPass, commitSuccess, credentials, defaultRole, logger, LOGIN_DN, LOGIN_NAME, LOGIN_PASSWORD, loginSuccess, principalGroupName, principals, roleGroupName, roles, setLdapCredential, setLdapDnPrincipal, setLdapPrincipal, sharedState, storePass, subject, tryFirstPass, useFirstPass
 
Constructor Summary
LdapLoginModule()
           
 
Method Summary
 void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
          
protected  boolean login(NameCallback nameCb, PasswordCallback passCb)
          Authenticates a Subject with the supplied callbacks.
static void main(String[] args)
          This provides command line access to this JAAS module.
 
Methods inherited from class org.ldaptive.jaas.AbstractLoginModule
abort, clearState, commit, getCredentials, login, logout, storeCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapLoginModule

public LdapLoginModule()
Method Detail

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map<String,?> sharedState,
                       Map<String,?> options)

Specified by:
initialize in interface LoginModule
Overrides:
initialize in class AbstractLoginModule

login

protected boolean login(NameCallback nameCb,
                        PasswordCallback passCb)
                 throws LoginException
Authenticates a Subject with the supplied callbacks.

Specified by:
login in class AbstractLoginModule
Parameters:
nameCb - callback handler for subject's name
passCb - callback handler for subject's password
Returns:
true if authentication succeeded, false to ignore this module
Throws:
LoginException - if the authentication fails

main

public static void main(String[] args)
                 throws Exception
This provides command line access to this JAAS module.

Parameters:
args - command line arguments
Throws:
Exception - if an error occurs


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.