org.ldaptive.jaas
Class LdapRoleAuthorizationModule
java.lang.Object
org.ldaptive.jaas.AbstractLoginModule
org.ldaptive.jaas.LdapRoleAuthorizationModule
- All Implemented Interfaces:
- LoginModule
public class LdapRoleAuthorizationModule
- extends AbstractLoginModule
Provides a JAAS authentication hook into LDAP roles. No authentication is
performed in this module. Role data is set for the login name in the shared
state or for the name returned by the CallbackHandler.
- Version:
- $Revision: 2904 $ $Date: 2014-03-14 12:15:20 -0400 (Fri, 14 Mar 2014) $
- Author:
- Middleware Services
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LdapRoleAuthorizationModule
public LdapRoleAuthorizationModule()
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 namepassCb - 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-2017 Virginia Tech. All Rights Reserved.