Package org.globus.gsi.gssapi.jaas
Class JaasSubject
- java.lang.Object
-
- org.globus.gsi.gssapi.jaas.JaasSubject
-
- Direct Known Subclasses:
GlobusSubject,StandardSubject
public abstract class JaasSubject extends Object
Generic JAAS Subject helper API that provides abstraction layer on top of vendor-specific JAAS Subject extensions implementations. Most vendors defined their own JAAS Subject helper classes because of the Subject propagation issue in JAAS.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJaasSubject()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ObjectdoAs(Subject subject, PrivilegedAction action)A convenience method, callsJaasSubject.getJaasSubject().runAs().static ObjectdoAs(Subject subject, PrivilegedExceptionAction action)A convenience method, callsJaasSubject.getJaasSubject().runAs().static SubjectgetCurrentSubject()A convenience method, callsJaasSubject.getJaasSubject().getSubject().static JaasSubjectgetJaasSubject()Gets current implementation of theJaasSubjectAPI.abstract SubjectgetSubject()SPI method.abstract ObjectrunAs(Subject subject, PrivilegedAction action)SPI method.abstract ObjectrunAs(Subject subject, PrivilegedExceptionAction action)SPI method.
-
-
-
Method Detail
-
getJaasSubject
public static JaasSubject getJaasSubject()
Gets current implementation of theJaasSubjectAPI. The method attempts to load aJaasSubjectimplementation by loading a class specified by the "org.globus.jaas.provider" system property. If the property is not set the default Globus implementation is loaded.
-
getSubject
public abstract Subject getSubject()
SPI method.
-
runAs
public abstract Object runAs(Subject subject, PrivilegedAction action)
SPI method.
-
runAs
public abstract Object runAs(Subject subject, PrivilegedExceptionAction action) throws PrivilegedActionException
SPI method.- Throws:
PrivilegedActionException
-
doAs
public static Object doAs(Subject subject, PrivilegedExceptionAction action) throws PrivilegedActionException
A convenience method, callsJaasSubject.getJaasSubject().runAs().- Throws:
PrivilegedActionException
-
doAs
public static Object doAs(Subject subject, PrivilegedAction action)
A convenience method, callsJaasSubject.getJaasSubject().runAs().
-
getCurrentSubject
public static Subject getCurrentSubject()
A convenience method, callsJaasSubject.getJaasSubject().getSubject().
-
-