org.jasig.cas.authentication.handler.support
Class HttpBasedServiceCredentialsAuthenticationHandler

java.lang.Object
  extended by org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler

public final class HttpBasedServiceCredentialsAuthenticationHandler
extends java.lang.Object
implements AuthenticationHandler

Class to validate the credentials presented by communicating with the web server and checking the certificate that is returned against the hostname, etc.

This class is concerned with ensuring that the protocol is HTTPS and that a response is returned. The SSL handshake that occurs automatically by opening a connection does the heavy process of authenticating.

Since:
3.0
Version:
$Revision: 48180 $ $Date: 2010-03-14 00:05:58 -0500 (Sun, 14 Mar 2010) $
Author:
Scott Battaglia

Constructor Summary
HttpBasedServiceCredentialsAuthenticationHandler()
           
 
Method Summary
 boolean authenticate(Credentials credentials)
          Method to determine if the credentials supplied are valid.
 void setHttpClient(HttpClient httpClient)
          Sets the HttpClient which will do all of the connection stuff.
 void setRequireSecure(boolean requireSecure)
          Set whether a secure url is required or not.
 boolean supports(Credentials credentials)
          Method to check if the handler knows how to handle the credentials provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpBasedServiceCredentialsAuthenticationHandler

public HttpBasedServiceCredentialsAuthenticationHandler()
Method Detail

authenticate

public boolean authenticate(Credentials credentials)
Description copied from interface: AuthenticationHandler
Method to determine if the credentials supplied are valid.

Specified by:
authenticate in interface AuthenticationHandler
Parameters:
credentials - The credentials to validate.
Returns:
true if valid, return false otherwise.

supports

public boolean supports(Credentials credentials)
Description copied from interface: AuthenticationHandler
Method to check if the handler knows how to handle the credentials provided. It may be a simple check of the Credentials class or something more complicated such as scanning the information contained in the Credentials object.

Specified by:
supports in interface AuthenticationHandler
Parameters:
credentials - The credentials to check.
Returns:
true if the credentials provided are not null and the credentials are a subclass of (or equal to) HttpBasedServiceCredentials.

setHttpClient

public void setHttpClient(HttpClient httpClient)
Sets the HttpClient which will do all of the connection stuff.


setRequireSecure

public void setRequireSecure(boolean requireSecure)
Set whether a secure url is required or not.

Parameters:
requireSecure - true if its required, false if not. Default is true.


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