org.jasig.cas.authentication.principal
Class UsernamePasswordCredentialsToPrincipalResolver

java.lang.Object
  extended by org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver
      extended by org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver
All Implemented Interfaces:
CredentialsToPrincipalResolver

public final class UsernamePasswordCredentialsToPrincipalResolver
extends AbstractPersonDirectoryCredentialsToPrincipalResolver

Implementation of CredentialsToPrincipalResolver for Credentials based on UsernamePasswordCredentials when a SimplePrincipal (username only) is sufficient.

Implementation extracts the username from the Credentials provided and constructs a new SimplePrincipal with the unique id set to the username.

Since:
3.0
Version:
$Revision: 1.2 $ $Date: 2007/01/22 20:35:26 $
Author:
Scott Battaglia
See Also:
SimplePrincipal

Field Summary
 
Fields inherited from class org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver
log
 
Constructor Summary
UsernamePasswordCredentialsToPrincipalResolver()
           
 
Method Summary
protected  java.lang.String extractPrincipalId(Credentials credentials)
          Extracts the id of the user from the provided credentials.
 boolean supports(Credentials credentials)
          Return true if Credentials are UsernamePasswordCredentials, false otherwise.
 
Methods inherited from class org.jasig.cas.authentication.principal.AbstractPersonDirectoryCredentialsToPrincipalResolver
resolvePrincipal, setAttributeRepository, setReturnNullIfNoAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsernamePasswordCredentialsToPrincipalResolver

public UsernamePasswordCredentialsToPrincipalResolver()
Method Detail

extractPrincipalId

protected java.lang.String extractPrincipalId(Credentials credentials)
Description copied from class: AbstractPersonDirectoryCredentialsToPrincipalResolver
Extracts the id of the user from the provided credentials.

Specified by:
extractPrincipalId in class AbstractPersonDirectoryCredentialsToPrincipalResolver
Parameters:
credentials - the credentials provided by the user.
Returns:
the username, or null if it could not be resolved.

supports

public boolean supports(Credentials credentials)
Return true if Credentials are UsernamePasswordCredentials, false otherwise.

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


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