org.jasig.cas.client.validation
Class Cas20ServiceTicketValidator

java.lang.Object
  extended by org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator
      extended by org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator
          extended by org.jasig.cas.client.validation.Cas20ServiceTicketValidator
All Implemented Interfaces:
TicketValidator
Direct Known Subclasses:
Cas20ProxyTicketValidator

public class Cas20ServiceTicketValidator
extends AbstractCasProtocolUrlBasedTicketValidator

Implementation of the TicketValidator that will validate Service Tickets in compliance with the CAS 2.

Since:
3.1
Version:
$Revision$ $Date$
Author:
Scott Battaglia

Field Summary
 
Fields inherited from class org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator
log
 
Constructor Summary
Cas20ServiceTicketValidator(java.lang.String casServerUrlPrefix)
          Constructs an instance of the CAS 2.0 Service Ticket Validator with the supplied CAS server url prefix.
 
Method Summary
protected  void customParseResponse(java.lang.String response, Assertion assertion)
          Template method if additional custom parsing (such as Proxying) needs to be done.
protected  java.util.Map extractCustomAttributes(java.lang.String xml)
           
protected  java.lang.String getUrlSuffix()
          The endpoint of the validation URL.
protected  Assertion parseResponseFromServer(java.lang.String response)
          Parses the response from the server into a CAS Assertion.
protected  void populateUrlAttributeMap(java.util.Map urlParameters)
          Adds the pgtUrl to the list of parameters to pass to the CAS server.
 void setProxyCallbackUrl(java.lang.String proxyCallbackUrl)
           
 void setProxyGrantingTicketStorage(ProxyGrantingTicketStorage proxyGrantingTicketStorage)
           
 void setProxyRetriever(ProxyRetriever proxyRetriever)
           
 
Methods inherited from class org.jasig.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator
retrieveResponseFromServer
 
Methods inherited from class org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator
constructValidationUrl, encodeUrl, setCustomParameters, setRenew, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cas20ServiceTicketValidator

public Cas20ServiceTicketValidator(java.lang.String casServerUrlPrefix)
Constructs an instance of the CAS 2.0 Service Ticket Validator with the supplied CAS server url prefix.

Parameters:
casServerUrlPrefix - the CAS Server URL prefix.
Method Detail

populateUrlAttributeMap

protected final void populateUrlAttributeMap(java.util.Map urlParameters)
Adds the pgtUrl to the list of parameters to pass to the CAS server.

Overrides:
populateUrlAttributeMap in class AbstractUrlBasedTicketValidator
Parameters:
urlParameters - the Map containing the existing parameters to send to the server.

getUrlSuffix

protected java.lang.String getUrlSuffix()
Description copied from class: AbstractUrlBasedTicketValidator
The endpoint of the validation URL. Should be relative (i.e. not start with a "/"). I.e. validate or serviceValidate.

Specified by:
getUrlSuffix in class AbstractUrlBasedTicketValidator
Returns:
the endpoint of the validation URL.

parseResponseFromServer

protected final Assertion parseResponseFromServer(java.lang.String response)
                                           throws TicketValidationException
Description copied from class: AbstractUrlBasedTicketValidator
Parses the response from the server into a CAS Assertion.

Specified by:
parseResponseFromServer in class AbstractUrlBasedTicketValidator
Parameters:
response - the response from the server, in any format.
Returns:
the CAS assertion if one could be parsed from the response.
Throws:
TicketValidationException - if an Assertion could not be created.

extractCustomAttributes

protected java.util.Map extractCustomAttributes(java.lang.String xml)

customParseResponse

protected void customParseResponse(java.lang.String response,
                                   Assertion assertion)
                            throws TicketValidationException
Template method if additional custom parsing (such as Proxying) needs to be done.

Parameters:
response - the original response from the CAS server.
assertion - the partially constructed assertion.
Throws:
TicketValidationException - if there is a problem constructing the Assertion.

setProxyCallbackUrl

public final void setProxyCallbackUrl(java.lang.String proxyCallbackUrl)

setProxyGrantingTicketStorage

public final void setProxyGrantingTicketStorage(ProxyGrantingTicketStorage proxyGrantingTicketStorage)

setProxyRetriever

public final void setProxyRetriever(ProxyRetriever proxyRetriever)


Copyright © 2006-2009 JA-SIG. All Rights Reserved.