IYaleCasContext

IYaleCasContext

IYaleCasContext is an interface which can (and should) be implemented by all SecurityContexts which seek to offer CAS ProxyTicket services to their clients.

package edu.yale.its.tp.portal.security;

/**
 * Interface implemented by CAS security contexts.
 * @author andrew.petro@yale.edu
 * @version $Revision:$ $Date:$
 */
public interface IYaleCasContext {
    /** Authentication type for Yale CAS authentication */
    public static final int YALE_CAS_AUTHTYPE = 0x1701;
    
    /**
     * Get a proxy ticket for a given target.
     * Implementations should return null if they are have no PGTIOU by which to obtain a proxy ticket.
     * Implementations should throw a CASProxyTicketAcquisitionException if an error occurs during an attempt
     * to obtain a PGT.  In particular, inability to contact the CAS server and expiration of the underlying PGT
     * should result in a CASProxyTicketAcquisitionException.
     * @param target - URL for which a proxy ticket is desired.
     * @return a valid proxy ticket for the target, or null.
     * @throws CASProxyTicketAcquisitionException - when unable to obtain Proxy Ticket.
     */
    public String getCasServiceToken(String target) throws CASProxyTicketAcquisitionException;
}