org.apache.geronimo.security
Class ContextManager
java.lang.Object
org.apache.geronimo.security.ContextManager
public class ContextManager
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GET_CONTEXT
public static final GeronimoSecurityPermission GET_CONTEXT
SET_CONTEXT
public static final GeronimoSecurityPermission SET_CONTEXT
EMPTY
public static final Subject EMPTY
ContextManager
public ContextManager()
login
public static LoginContext login(String realm,
CallbackHandler callbackHandler)
throws LoginException
- Throws:
LoginException
logout
public static void logout(LoginContext loginContext)
throws LoginException
- Throws:
LoginException
setCallers
public static void setCallers(Subject currentCaller,
Subject nextCaller)
clearCallers
public static void clearCallers()
getCallers
public static Callers getCallers()
setNextCaller
public static Callers setNextCaller(Subject nextCaller)
pushNextCaller
public static Callers pushNextCaller(Subject nextCaller)
popCallers
public static void popCallers(Callers oldCallers)
getCurrentCaller
public static Subject getCurrentCaller()
getNextCaller
public static Subject getNextCaller()
getCurrentContext
public static AccessControlContext getCurrentContext()
getCurrentPrincipal
public static Principal getCurrentPrincipal(Subject callerSubject)
getCurrentId
public static SubjectId getCurrentId()
getSubjectId
public static SubjectId getSubjectId(Subject subject)
isCallerInRole
public static boolean isCallerInRole(String EJBName,
String role)
getRegisteredSubject
public static Subject getRegisteredSubject(SubjectId id)
registerSubject
public static SubjectId registerSubject(Subject subject)
unregisterSubject
public static void unregisterSubject(Subject subject)
getThreadPrincipal
public static IdentificationPrincipal getThreadPrincipal()
- Obtain the thread's identifying principal.
Clients should use
Subject.doAs*
to associate a Subject
with the thread's call stack. It is this Subject that will be used for
authentication checks.
Return a IdentificationPrincipal
. This kind of principal
is inserted into a subject if one uses one of the Geronimo LoginModules.
It is a secure id that identifies the Subject.
- Returns:
- the principal that identifies the Subject of this thread.
- See Also:
Subject.doAs(javax.security.auth.Subject, java.security.PrivilegedAction)
,
Subject.doAs(javax.security.auth.Subject, java.security.PrivilegedExceptionAction)
,
Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedAction, java.security.AccessControlContext)
,
Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction, java.security.AccessControlContext)
getAlgorithm
public static String getAlgorithm()
setAlgorithm
public static void setAlgorithm(String algorithm)
getPassword
public static String getPassword()
setPassword
public static void setPassword(String password)
Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.