|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.cams.auth.login.module.ActiveDirectoryLoginModule
Implements the LoginModule interface found in JAAS to authenticate users against an Active Directory repository. This implementation uses a ServiceFinder object to retrieve a connection for the specific repository to authenticate against. Once a connection is obtained the LoginModule attempts to authenticate the user. The method of authentication is always bind, as Active Directory does not permit retreival or LDAP compares against the userPassword attribute. All configuration parameters are listed below:
Subject,
CallbackHandler,
LoginModule| Constructor Summary | |
ActiveDirectoryLoginModule()
Default ActiveDirectoryLoginModule Constructor. |
|
| Method Summary | |
boolean |
abort()
Method to abort the authentication process (phase 2). |
boolean |
commit()
Method to commit the authentication process (phase 2). |
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options)
Initialize this LoginModule. |
boolean |
login()
Method to authenticate a Subject (phase 1).
|
boolean |
logout()
Method which logs out a Subject.
|
void |
setLogger(Logger logger)
Sets the logger. |
void |
setServiceFinder(ServiceFinder finder)
Set the ServiceFinder. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ActiveDirectoryLoginModule()
| Method Detail |
public void setServiceFinder(ServiceFinder finder)
setServiceFinder in interface ServiceClientfinder - the class used by find Services by the ServiceClient.public void setLogger(Logger logger)
setLogger in interface LoggerClientlogger - logs messages
public void initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options)
This method is called by the LoginContext
after this LoginModule has been instantiated.
The purpose of this method is to initialize this
LoginModule with the relevant information.
If this LoginModule does not understand
any of the data stored in sharedState or
options parameters, they can be ignored.
initialize in interface LoginModulesubject - the Subject to be authenticated.callbackHandler - a CallbackHandler for communicating
with the end user (prompting for usernames and
passwords, for example).sharedState - state shared with other configured LoginModules.options - options specified in the login
Configuration for this particular
LoginModule.
public boolean login()
throws LoginException
Subject (phase 1).
The implementation of this method authenticates
a Subject. For example, it may prompt for
Subject information such as a username and password
and then attempt to verify the password. This method saves the
result of the authentication attempt as private state within
the LoginModule.
login in interface LoginModuleLoginModule should be ignored.
LoginException - if the authentication fails
public boolean commit()
throws LoginException
This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded).
If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
login method), then this method associates relevant
Principals and Credentials with the Subject located in the
LoginModule. If this LoginModule's own
authentication attempted failed, then this method removes/destroys
any state that was originally saved.
commit in interface LoginModuleLoginModule should be ignored.
LoginException - if the commit fails
public boolean abort()
throws LoginException
This method is called if the LoginContext's overall authentication failed. (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed).
If this LoginModule's own authentication attempt succeeded (checked
by retrieving the private state saved by the login method),
then this method cleans up any state that was originally saved.
abort in interface LoginModuleLoginModule should be ignored.
LoginException - if the abort fails
public boolean logout()
throws LoginException
Subject.
An implementation of this method might remove/destroy a Subject's Principals and Credentials.
logout in interface LoginModuleLoginModule should be ignored.
LoginException - if the logout fails
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||