01: /* Copyright 2006 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.security.provider.cas;
07:
08: /**
09: * Interface implemented by CAS security contexts.
10: * CAS security contexts are capable of getting a token - a proxy ticket -
11: * suitable for accessing a given String-identified service. This interface
12: * declares a method for getting such a token.
13: *
14: * This interface evolved from edu.yale.its.tp.portal.security.IYaleCasContext
15: * as distributed in the Yale uPortal CAS security provider distribution version
16: * 3.0.0.
17: *
18: * @version $Revision$ $Date$
19: */
20: public interface ICasSecurityContext {
21: /** Authentication type for CAS authentication */
22: public static final int CAS_AUTHTYPE = 0x1701;
23:
24: /**
25: * Get a proxy ticket for a given target.
26: * Implementations should return null if no PGTIOU or PGT is available by
27: * which to obtain a proxy ticket.
28: * Implementations should throw a CASProxyTicketAcquisitionException if
29: * an error occurs during an attempt
30: * to obtain a PGT. In particular, inability to contact the CAS server and
31: * expiration of the underlying PGT
32: * should result in a CASProxyTicketAcquisitionException.
33: * @param target - URL for which a proxy ticket is desired.
34: * @return a valid proxy ticket for the target, or null.
35: * @throws CASProxyTicketAcquisitionException - when unable to obtain Proxy Ticket.
36: */
37: public String getCasServiceToken(String target)
38: throws CasProxyTicketAcquisitionException;
39: }
|