org.jasig.portal.security.provider
Class UnionSecurityContext

java.lang.Object
  extended by org.jasig.portal.security.provider.ChainingSecurityContext
      extended by org.jasig.portal.security.provider.UnionSecurityContext
All Implemented Interfaces:
java.io.Serializable, ISecurityContext

 class UnionSecurityContext
extends ChainingSecurityContext

A simple extension of ChainingSecurityContext that acts merely as a placeholder but considers itself in an "authenticated" state if any of its subcontexts are "authenticated."

Version:
$Revision: 1.8 $ $Date: 2005/04/19 01:32:28 $
Author:
Shawn Bayern

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jasig.portal.security.provider.ChainingSecurityContext
ChainingSecurityContext.ChainingAdditionalDescriptor, ChainingSecurityContext.ChainingOpaqueCredentials, ChainingSecurityContext.ChainingPrincipal
 
Field Summary
private  int UNION_SECURITY_AUTHTYPE
           
 
Fields inherited from class org.jasig.portal.security.provider.ChainingSecurityContext
isauth, log, myAdditionalDescriptor, myOpaqueCredentials, myOrder, myPrincipal, mySubContexts, stopWhenAuthenticated
 
Constructor Summary
UnionSecurityContext()
           
 
Method Summary
 void authenticate()
          We walk the chain of subcontext assigning principals and opaquecredentials from the parent.
 int getAuthType()
          Returns the canonical authentication type for this flavor of authentication.
 java.lang.String toString()
           
 
Methods inherited from class org.jasig.portal.security.provider.ChainingSecurityContext
addSubContext, doesSubContextExist, getAdditionalDescriptor, getOpaqueCredentials, getOpaqueCredentialsInstance, getPrincipal, getPrincipalInstance, getSubContext, getSubContextNames, getSubContexts, isAuthenticated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNION_SECURITY_AUTHTYPE

private final int UNION_SECURITY_AUTHTYPE
See Also:
Constant Field Values
Constructor Detail

UnionSecurityContext

UnionSecurityContext()
Method Detail

getAuthType

public int getAuthType()
Description copied from interface: ISecurityContext
Returns the canonical authentication type for this flavor of authentication. Each value returned should be either a globally registered auth flavor or a local variant.

Returns:
The unique authentication value identifier. Values with the high order 16 bits clear are local (0x0000 - 0x00FF) where values with the high order 16 bits set (0xFF00 - 0xFFFF are foundation types distributed by JASIG. All other should be registered and globally unique.

authenticate

public void authenticate()
                  throws PortalSecurityException
Description copied from class: ChainingSecurityContext
We walk the chain of subcontext assigning principals and opaquecredentials from the parent. Note that the contexts themselves should resist actually performing the assignment if an assignment has already been made to either the credentials or the UID.

Specified by:
authenticate in interface ISecurityContext
Overrides:
authenticate in class ChainingSecurityContext
Throws:
PortalSecurityException
See Also:
ISecurityContext.getPrincipalInstance(), ISecurityContext.getOpaqueCredentialsInstance()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object