org.apache.geronimo.security
Class ContextManager

java.lang.Object
  extended by org.apache.geronimo.security.ContextManager

public class ContextManager
extends Object


Field Summary
static Subject EMPTY
           
static GeronimoSecurityPermission GET_CONTEXT
           
static GeronimoSecurityPermission SET_CONTEXT
           
 
Constructor Summary
ContextManager()
           
 
Method Summary
static void clearCallers()
           
static String getAlgorithm()
           
static Callers getCallers()
           
static Subject getCurrentCaller()
           
static AccessControlContext getCurrentContext()
           
static SubjectId getCurrentId()
           
static Principal getCurrentPrincipal(Subject callerSubject)
           
static Subject getNextCaller()
           
static String getPassword()
           
static Subject getRegisteredSubject(SubjectId id)
           
static SubjectId getSubjectId(Subject subject)
           
static IdentificationPrincipal getThreadPrincipal()
          Obtain the thread's identifying principal.
static boolean isCallerInRole(String EJBName, String role)
           
static LoginContext login(String realm, CallbackHandler callbackHandler)
           
static void logout(LoginContext loginContext)
           
static void popCallers(Callers oldCallers)
           
static Callers pushNextCaller(Subject nextCaller)
           
static SubjectId registerSubject(Subject subject)
           
static void setAlgorithm(String algorithm)
           
static void setCallers(Subject currentCaller, Subject nextCaller)
           
static Callers setNextCaller(Subject nextCaller)
           
static void setPassword(String password)
           
static void unregisterSubject(Subject subject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_CONTEXT

public static final GeronimoSecurityPermission GET_CONTEXT

SET_CONTEXT

public static final GeronimoSecurityPermission SET_CONTEXT

EMPTY

public static final Subject EMPTY
Constructor Detail

ContextManager

public ContextManager()
Method Detail

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.