jrun.security
Interface SecurityContext

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
JRunSecurityContext

public interface SecurityContext
extends java.io.Serializable

SecurityContext Interface provides functionality for maintaining authenticated security information and access to security principals and credentials associated with a security context.

Author:
Ramesh Natarajan
See Also:

Method Summary
 void addRunAs(java.lang.String runAsIdentity, SimplePrincipal callingPrincipal)
          Make this principal the RunAs principal
 java.lang.Object getCallerCredential()
           
 SimplePrincipal getCallerPrincipal()
          Returns the Caller Principal.
 SimplePrincipal getRunAsPrincipal()
          If the current component has run as identity specified in its metadata, this returns the principal associated with that run as identity, else returns null
 javax.security.auth.Subject getSubject()
           
 boolean isRunAs()
          Does the Invocation have a RunAs Identity ?
 void removeRunAs()
          Remove the current RunAs principal and make the previous one, the active principal
 

Method Detail

getCallerPrincipal

public SimplePrincipal getCallerPrincipal()
Returns the Caller Principal. This could be a role or a User principal depending on whether the previous invocation in this call chain had a run as identity or caller identity

getRunAsPrincipal

public SimplePrincipal getRunAsPrincipal()
If the current component has run as identity specified in its metadata, this returns the principal associated with that run as identity, else returns null

getCallerCredential

public java.lang.Object getCallerCredential()

getSubject

public javax.security.auth.Subject getSubject()

addRunAs

public void addRunAs(java.lang.String runAsIdentity,
                     SimplePrincipal callingPrincipal)
Make this principal the RunAs principal

removeRunAs

public void removeRunAs()
Remove the current RunAs principal and make the previous one, the active principal

isRunAs

public boolean isRunAs()
Does the Invocation have a RunAs Identity ?


Copyright � 2002 Macromedia Corporation. All Rights Reserved.