org.jasig.portal.services
Class Authentication

java.lang.Object
  extended by org.jasig.portal.services.Authentication

public class Authentication
extends Object

Attempts to authenticate a user and retrieve attributes associated with the user.

Version:
$Revision: 20532 $ Changes put in to allow credentials and principals to be defined and held by each context.
Author:
Ken Weiner, kweiner@unicon.net, Don Fracapane (df7@columbia.edu) Added properties in the security properties file that hold the tokens used to represent the principal and credential for each security context. This version differs in the way the principal and credentials are set (all contexts are set up front after evaluating the tokens). See setContextParameters() also.

Field Summary
protected  ISecurityContext ic
           
static MovingAverageSample lastAuthentication
           
protected  IPerson m_Person
           
 
Constructor Summary
Authentication()
           
 
Method Summary
 void authenticate(HashMap principals, HashMap credentials, IPerson person)
          Attempts to authenticate a given IPerson based on a set of principals and credentials
 IPerson getPerson()
          Returns an IPerson object that can be used to hold site-specific attributes about the logged on user.
 ISecurityContext getSecurityContext()
          Returns an ISecurityContext object that can be used later.
protected  String getUsername(IPerson person)
          Return the username to be used for authorization (exit hook)
protected  void resetEntityIdentifier(IPerson person, IPerson newPerson)
          Reset the entity identifier in the final person object (exit hook)
 void setContextParameters(HashMap principals, HashMap credentials, String ctxName, ISecurityContext securityContext, IPerson person)
          Get the principal and credential for a specific context and store them in the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Person

protected IPerson m_Person

ic

protected ISecurityContext ic

lastAuthentication

public static MovingAverageSample lastAuthentication
Constructor Detail

Authentication

public Authentication()
Method Detail

authenticate

public void authenticate(HashMap principals,
                         HashMap credentials,
                         IPerson person)
                  throws PortalSecurityException
Attempts to authenticate a given IPerson based on a set of principals and credentials

Parameters:
principals -
credentials -
person -
Throws:
PortalSecurityException

getUsername

protected String getUsername(IPerson person)
Return the username to be used for authorization (exit hook)

Parameters:
person -
Returns:
usernmae

resetEntityIdentifier

protected void resetEntityIdentifier(IPerson person,
                                     IPerson newPerson)
Reset the entity identifier in the final person object (exit hook)

Parameters:
person -
newPerson -

getPerson

public IPerson getPerson()
Returns an IPerson object that can be used to hold site-specific attributes about the logged on user. This information is established during authentication.

Returns:
An object that implements the org.jasig.portal.security.IPerson interface.

getSecurityContext

public ISecurityContext getSecurityContext()
Returns an ISecurityContext object that can be used later. This object is passed as part of the IChannel Interface. The security context may be used to gain authorized access to services.

Returns:
An object that implements the org.jasig.portal.security.ISecurityContext interface.

setContextParameters

public void setContextParameters(HashMap principals,
                                 HashMap credentials,
                                 String ctxName,
                                 ISecurityContext securityContext,
                                 IPerson person)
Get the principal and credential for a specific context and store them in the context.

Parameters:
principals -
credentials -
ctxName -
securityContext -
person -


Copyright © 2010 Jasig. All Rights Reserved.