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 boolean
abort()
Pop the run as role using the SecurityAssociation.popRunAsIdentity methodboolean
commit()
Calls abort to pop the run-as rolevoid
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.boolean
login()
Push the run as role using the SecurityAssociation.pushRunAsIdentity methodboolean
logout()
-
-
-
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:
initialize
in interfaceLoginModule
-
login
public boolean login()
Push the run as role using the SecurityAssociation.pushRunAsIdentity method- Specified by:
login
in interfaceLoginModule
- See Also:
SecurityContextAssociation.pushRunAsIdentity(org.jboss.security.RunAs)
-
commit
public boolean commit()
Calls abort to pop the run-as role- Specified by:
commit
in interfaceLoginModule
-
abort
public boolean abort()
Pop the run as role using the SecurityAssociation.popRunAsIdentity method- Specified by:
abort
in interfaceLoginModule
- See Also:
SecurityContextAssociation.popRunAsIdentity()
-
logout
public boolean logout()
- Specified by:
logout
in interfaceLoginModule
-
-