org.jasig.cas.authentication.principal
Class HttpBasedServiceCredentialsToPrincipalResolver

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

public final class HttpBasedServiceCredentialsToPrincipalResolver
extends java.lang.Object
implements CredentialsToPrincipalResolver

HttpBasedServiceCredentialsToPrincipalResolver extracts the callbackUrl from the HttpBasedServiceCredentials and constructs a SimpleService with the callbackUrl as the unique Id.

Since:
3.0
Version:
$Revision: 1.5 $ $Date: 2007/02/27 19:31:58 $
Author:
Scott Battaglia

Constructor Summary
HttpBasedServiceCredentialsToPrincipalResolver()
           
 
Method Summary
 Principal resolvePrincipal(Credentials credentials)
          Method to return a simple Service Principal with the identifier set to be the callback url.
 boolean supports(Credentials credentials)
          Determine if a credentials type is supported by this resolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpBasedServiceCredentialsToPrincipalResolver

public HttpBasedServiceCredentialsToPrincipalResolver()
Method Detail

resolvePrincipal

public Principal resolvePrincipal(Credentials credentials)
Method to return a simple Service Principal with the identifier set to be the callback url.

Specified by:
resolvePrincipal in interface CredentialsToPrincipalResolver
Parameters:
credentials - from which to resolve Principal
Returns:
resolved Principal, or null if the principal could not be resolved.

supports

public boolean supports(Credentials credentials)
Description copied from interface: CredentialsToPrincipalResolver
Determine if a credentials type is supported by this resolver. This is checked before calling resolve principal.

Specified by:
supports in interface CredentialsToPrincipalResolver
Parameters:
credentials - The credentials to check if we support.
Returns:
true if the credentials provided are not null and are assignable from HttpBasedServiceCredentials, otherwise returns false.


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