org.jasig.cas.authentication.principal
Interface CredentialsToPrincipalResolver

All Known Implementing Classes:
HttpBasedServiceCredentialsToPrincipalResolver, UsernamePasswordCredentialsToPrincipalResolver

public interface CredentialsToPrincipalResolver

CredentialsToPrincipalResolvers extract information from the Credentials provided and determine the Principal represented by those credentials.

A minimal Principal object just has one ID value. This can be extended with richer objects containing more properties. The SimplePrincipal class implementing this interface just stores a userid.

The Credentials typically contains a userid typed by the user or a Certificate presented by the browser. In the simplest case the userid is stored as the Principal ID. The Certificate is a more complicated case because the ID may have to be extracted from the Subject DN or from one of the alternate subject names. In a few cases, the institution may prefer the ID to be a student or employee ID number that can only be obtained by database lookup using information supplied in the Credentials.

The Resolver is free to obtain additional information about the user and place it in the fields of a class that extends Principal. Such extended information will be stored like other Principal objects in the TGT, persisted as needed, and will be available to the View layer, but it is transparent to most CAS processing.

Since:
3.0
Version:
$Revision$ $Date$
Author:
Scott Battaglia
See Also:
Principal, Credentials

Method Summary
 Principal resolvePrincipal(Credentials credentials)
          Turn Credentials into a Principal object by analyzing the information provided in the Credentials and constructing a Principal object based on that information or information derived from the Credentials object.
 boolean supports(Credentials credentials)
          Determine if a credentials type is supported by this resolver.
 

Method Detail

resolvePrincipal

public Principal resolvePrincipal(Credentials credentials)
Turn Credentials into a Principal object by analyzing the information provided in the Credentials and constructing a Principal object based on that information or information derived from the Credentials object.

Parameters:
credentials - from which to resolve Principal
Returns:
resolved Principal

supports

public boolean supports(Credentials credentials)
Determine if a credentials type is supported by this resolver. This is checked before calling resolve principal.

Parameters:
credentials - The credentials to check if we support.
Returns:
true if we support these credentials, false otherwise.


Copyright © 2004-2005 Java Architectures Special Interest Group. All Rights Reserved.