org.acegisecurity.providers.cas.ticketvalidator
Class CasProxyTicketValidator

java.lang.Object
  extended by org.acegisecurity.providers.cas.ticketvalidator.AbstractTicketValidator
      extended by org.acegisecurity.providers.cas.ticketvalidator.CasProxyTicketValidator
All Implemented Interfaces:
TicketValidator, org.springframework.beans.factory.InitializingBean

public class CasProxyTicketValidator
extends AbstractTicketValidator

Uses CAS' ProxyTicketValidator to validate a service ticket.

Version:
$Id: CasProxyTicketValidator.java 1784 2007-02-24 21:00:24Z luke_t $
Author:
Ben Alex

Constructor Summary
CasProxyTicketValidator()
           
 
Method Summary
 TicketResponse confirmTicketValid(String serviceTicket)
          Returns information about the ticket, if it is valid for this service.
 String getProxyCallbackUrl()
          Optional callback URL to obtain a proxy-granting ticket from CAS.
 void setProxyCallbackUrl(String proxyCallbackUrl)
           
protected  TicketResponse validateNow(edu.yale.its.tp.cas.client.ProxyTicketValidator pv)
          Perform the actual remote invocation.
 
Methods inherited from class org.acegisecurity.providers.cas.ticketvalidator.AbstractTicketValidator
afterPropertiesSet, getCasValidate, getServiceProperties, getTrustStore, setCasValidate, setServiceProperties, setTrustStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CasProxyTicketValidator

public CasProxyTicketValidator()
Method Detail

confirmTicketValid

public TicketResponse confirmTicketValid(String serviceTicket)
                                  throws AuthenticationException
Description copied from interface: TicketValidator
Returns information about the ticket, if it is valid for this service.

Must throw an AuthenticationException if the ticket is not valid for this service.

Parameters:
serviceTicket - DOCUMENT ME!
Returns:
details of the CAS service ticket
Throws:
AuthenticationException - DOCUMENT ME!

getProxyCallbackUrl

public String getProxyCallbackUrl()
Optional callback URL to obtain a proxy-granting ticket from CAS.

This callback URL belongs to the Acegi Security System for Spring secured application. We suggest you use CAS' ProxyTicketReceptor servlet to receive this callback and manage the proxy-granting ticket list. The callback URL is usually something like https://www.mycompany.com/application/casProxy/receptor.

If left null, the CasAuthenticationToken will not have a proxy granting ticket IOU and there will be no proxy-granting ticket callback. Accordingly, the Acegi Securty System for Spring secured application will be unable to obtain a proxy ticket to call another CAS-secured service on behalf of the user. This is not really an issue for most applications.

Returns:
the proxy callback URL, or null if not used

setProxyCallbackUrl

public void setProxyCallbackUrl(String proxyCallbackUrl)

validateNow

protected TicketResponse validateNow(edu.yale.its.tp.cas.client.ProxyTicketValidator pv)
                              throws AuthenticationServiceException,
                                     BadCredentialsException
Perform the actual remote invocation. Protected to enable replacement during tests.

Parameters:
pv - the populated ProxyTicketValidator
Returns:
the TicketResponse
Throws:
AuthenticationServiceException - ifProxyTicketValidator internally fails
BadCredentialsException - DOCUMENT ME!


Copyright © 2004-2009 Interface21, Inc. All Rights Reserved.