org.jasig.portal.security.provider
Class JAASSecurityContext

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

 class JAASSecurityContext
extends ChainingSecurityContext
implements ISecurityContext, java.io.Serializable

This is an implementation of a SecurityContext that checks a user's credentials using JAAS.

Version:
$Revision: 1.12 $
Author:
Nathan Jacobs

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jasig.portal.security.provider.ChainingSecurityContext
ChainingSecurityContext.ChainingAdditionalDescriptor, ChainingSecurityContext.ChainingOpaqueCredentials, ChainingSecurityContext.ChainingPrincipal
 
Field Summary
private  IAdditionalDescriptor additionalDescriptor
           
private  int JAASSECURITYAUTHTYPE
           
private static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.jasig.portal.security.provider.ChainingSecurityContext
isauth, myAdditionalDescriptor, myOpaqueCredentials, myOrder, myPrincipal, mySubContexts, stopWhenAuthenticated
 
Constructor Summary
JAASSecurityContext()
           
 
Method Summary
 void authenticate()
          We walk the chain of subcontext assigning principals and opaquecredentials from the parent.
 IAdditionalDescriptor getAdditionalDescriptor()
          Returns any additional descriptor information that might have been acquired during the process of authentication.
 int getAuthType()
          Returns the canonical authentication type for this flavor of authentication.
 
Methods inherited from class org.jasig.portal.security.provider.ChainingSecurityContext
addSubContext, doesSubContextExist, getOpaqueCredentials, getOpaqueCredentialsInstance, getPrincipal, getPrincipalInstance, getSubContext, getSubContextNames, getSubContexts, isAuthenticated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jasig.portal.security.ISecurityContext
addSubContext, getOpaqueCredentials, getOpaqueCredentialsInstance, getPrincipal, getPrincipalInstance, getSubContext, getSubContextNames, getSubContexts, isAuthenticated
 

Field Detail

log

private static final org.apache.commons.logging.Log log

JAASSECURITYAUTHTYPE

private final int JAASSECURITYAUTHTYPE
See Also:
Constant Field Values

additionalDescriptor

private IAdditionalDescriptor additionalDescriptor
Constructor Detail

JAASSecurityContext

JAASSecurityContext()
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.

Specified by:
getAuthType in interface ISecurityContext
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.

getAdditionalDescriptor

public IAdditionalDescriptor getAdditionalDescriptor()
Description copied from interface: ISecurityContext
Returns any additional descriptor information that might have been acquired during the process of authentication. Note that this interface has no methods and the object returned will have to be cast to some concrete type or alternate interface to be useful.

Specified by:
getAdditionalDescriptor in interface ISecurityContext
Overrides:
getAdditionalDescriptor in class ChainingSecurityContext
Returns:
An object containing any additional descriptor information.
See Also:
IAdditionalDescriptor

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()