| java.lang.Object org.josso.tc60.agent.jaas.SSOGatewayLoginModule
SSOGatewayLoginModule | public class SSOGatewayLoginModule implements LoginModule(Code) | | SSO Gateway JAAS Login Module.
This Login Module authenticates an SSO Session against the Single Sign-on Gateway
by getting the associated user and roles and filling it to the provided Subject.
This way clients can obtain the authenticated identity associated with the session and use it
to protect resources (ie: web, etc.).
author: Gianluca Brigandi version: CVS $Id: SSOGatewayLoginModule.java 338 2006-02-09 16:53:07Z sgonzalez $ |
Method Summary | |
public boolean | abort() This method is called if the LoginContext's
overall authentication failed.
exception: LoginException - if the abort fails. | public boolean | commit() This method is called if the LoginContext's overall authentication succeeded.
Using the SSO user name, saved by the previosuly executed login() operation, obtains from the gateway
the roles associated with the user and fills the Subject with the user and role principals.
If this LoginModule's own authentication attempted failed, then this method removes any state that was
originally saved.
exception: LoginException - if the commit fails. | protected SSORole[] | getRoleSets() | public void | initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) | public boolean | login() Authenticate the user by prompting for the SSO Session Identifier assigned by the SSO Gateway on logon.
This method obtains from the gateway, using the provided session identifier, the user associated with
such session identifier.
Only the NameCallBack is used, since its not a user/password pair but only one value containing the session
identifier. | public boolean | logout() Logout the user.
This method removes the SSO User and Role Principals from the Subject that were added by the commit()
method.
exception: LoginException - if the logout fails. |
_succeeded | protected boolean _succeeded(Code) | | |
commitSucceeded | protected boolean commitSucceeded(Code) | | |
abort | public boolean abort() throws LoginException(Code) | | This method is called if the LoginContext's
overall authentication failed.
exception: LoginException - if the abort fails. false if this LoginModule's own login and/or commit attemptsfailed, and true otherwise. |
commit | public boolean commit() throws LoginException(Code) | | This method is called if the LoginContext's overall authentication succeeded.
Using the SSO user name, saved by the previosuly executed login() operation, obtains from the gateway
the roles associated with the user and fills the Subject with the user and role principals.
If this LoginModule's own authentication attempted failed, then this method removes any state that was
originally saved.
exception: LoginException - if the commit fails. true if this LoginModule's own login and commitattempts succeeded, or false otherwise. |
initialize | public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)(Code) | | Initialize this LoginModule
Parameters: subject - the Subject to be authenticated. Parameters: callbackHandler - a CallbackHandler for communicatingwith the end user (prompting for user names andpasswords, for example). Parameters: sharedState - shared LoginModule state. Parameters: options - options specified in the login Configurationfor this particular LoginModule. |
login | public boolean login() throws LoginException(Code) | | Authenticate the user by prompting for the SSO Session Identifier assigned by the SSO Gateway on logon.
This method obtains from the gateway, using the provided session identifier, the user associated with
such session identifier.
Only the NameCallBack is used, since its not a user/password pair but only one value containing the session
identifier. Any other callback type is ignored.
true in all cases since this LoginModuleshould not be ignored. exception: javax.security.auth.login.FailedLoginException - if the authentication fails. exception: javax.security.auth.login.LoginException - if this LoginModuleis unable to perform the authentication. |
logout | public boolean logout() throws LoginException(Code) | | Logout the user.
This method removes the SSO User and Role Principals from the Subject that were added by the commit()
method.
exception: LoginException - if the logout fails. true in all cases since this LoginModuleshould not be ignored. |
|
|