| java.lang.Object org.acegisecurity.providers.jaas.SecurityContextLoginModule
SecurityContextLoginModule | public class SecurityContextLoginModule implements LoginModule(Code) | | An implementation of
LoginModule that uses an Acegi Security
org.acegisecurity.context.SecurityContext SecurityContext to provide authentication. This LoginModule
provides opposite functionality to the
JaasAuthenticationProvider API, and should not really be used in
conjunction with it.
The
JaasAuthenticationProvider allows Acegi to authenticate against Jaas.
The SecurityContextLoginModule allows a Jaas based application to authenticate against Acegi. If there is no
Authentication in the
SecurityContextHolder the login() method will throw a LoginException by default.
This functionality can be changed with the ignoreMissingAuthentication option by setting it to "true".
Setting ignoreMissingAuthentication=true will tell the SecurityContextLoginModule to simply return false and be
ignored if the authentication is null.
author: Brian Moseley author: Ray Krueger |
Method Summary | |
public boolean | abort() Abort the authentication process by forgetting the Acegi Security Authentication . | public boolean | commit() Authenticate the Subject (phase two) by adding the Acegi Security
Authentication to the Subject 's principals. | Authentication | getAuthentication() | Subject | getSubject() | public void | initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) Initialize this LoginModule . | public boolean | login() Authenticate the Subject (phase one) by extracting the Acegi Security
Authentication from the current SecurityContext . | public boolean | logout() Log out the Subject . |
abort | public boolean abort() throws LoginException(Code) | | Abort the authentication process by forgetting the Acegi Security Authentication .
true if this method succeeded, or false if this LoginModule should be ignored. exception: LoginException - if the abort fails |
commit | public boolean commit() throws LoginException(Code) | | Authenticate the Subject (phase two) by adding the Acegi Security
Authentication to the Subject 's principals.
true if this method succeeded, or false if this LoginModule should be ignored. exception: LoginException - if the commit fails |
initialize | public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)(Code) | | Initialize this LoginModule . Ignores the callback handler, since the code establishing the
LoginContext likely won't provide one that understands Acegi Security. Also ignores the
sharedState and options parameters, since none are recognized.
Parameters: subject - the Subject to be authenticated. Parameters: callbackHandler - is ignored Parameters: sharedState - is ignored Parameters: options - are ignored
|
login | public boolean login() throws LoginException(Code) | | Authenticate the Subject (phase one) by extracting the Acegi Security
Authentication from the current SecurityContext .
true if the authentication succeeded, or false if this LoginModule should be ignored. throws: LoginException - if the authentication fails |
logout | public boolean logout() throws LoginException(Code) | | Log out the Subject .
true if this method succeeded, or false if this LoginModule should be ignored. exception: LoginException - if the logout fails |
|
|