Package org.jboss.security.auth.spi
Class RunAsLoginModule
- java.lang.Object
-
- org.jboss.security.auth.spi.RunAsLoginModule
-
- All Implemented Interfaces:
LoginModule
public class RunAsLoginModule extends Object implements LoginModule
A login module that establishes a run-as role for the duration of the login phase of authentication. It can be used to allow another login module interact with a secured EJB that provides authentication services.- Version:
- $Revision$
- Author:
- Scott.Stark@jboss.org
-
-
Constructor Summary
Constructors Constructor Description RunAsLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort()Pop the run as role using the SecurityAssociation.popRunAsIdentity methodbooleancommit()Calls abort to pop the run-as rolevoidinitialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options)Look for the roleName option that specifies the role to use as the run-as role.booleanlogin()Push the run as role using the SecurityAssociation.pushRunAsIdentity methodbooleanlogout()
-
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options)
Look for the roleName option that specifies the role to use as the run-as role. If not specified a default role name of nobody is used.- Specified by:
initializein interfaceLoginModule
-
login
public boolean login()
Push the run as role using the SecurityAssociation.pushRunAsIdentity method- Specified by:
loginin interfaceLoginModule- See Also:
SecurityContextAssociation.pushRunAsIdentity(org.jboss.security.RunAs)
-
commit
public boolean commit()
Calls abort to pop the run-as role- Specified by:
commitin interfaceLoginModule
-
abort
public boolean abort()
Pop the run as role using the SecurityAssociation.popRunAsIdentity method- Specified by:
abortin interfaceLoginModule- See Also:
SecurityContextAssociation.popRunAsIdentity()
-
logout
public boolean logout()
- Specified by:
logoutin interfaceLoginModule
-
-