01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
14: */
15:
16: package org.acegisecurity.providers.cas;
17:
18: import org.acegisecurity.AuthenticationException;
19:
20: /**
21: * Validates a CAS service ticket.
22: *
23: * <p>
24: * Implementations must accept CAS proxy tickets, in addition to CAS service
25: * tickets. If proxy tickets should be rejected, this is resolved by a {@link
26: * CasProxyDecider} implementation (not by the <code>TicketValidator</code>).
27: * </p>
28: *
29: * <p>
30: * Implementations may request a proxy granting ticket if wish, although this
31: * behaviour is not mandatory.
32: * </p>
33: *
34: * @author Ben Alex
35: * @version $Id: TicketValidator.java 1784 2007-02-24 21:00:24Z luke_t $
36: */
37: public interface TicketValidator {
38: //~ Methods ========================================================================================================
39:
40: /**
41: * Returns information about the ticket, if it is valid for this service.<P>Must throw an
42: * <code>AuthenticationException</code> if the ticket is not valid for this service.</p>
43: *
44: * @param serviceTicket DOCUMENT ME!
45: *
46: * @return details of the CAS service ticket
47: *
48: * @throws AuthenticationException DOCUMENT ME!
49: */
50: TicketResponse confirmTicketValid(String serviceTicket)
51: throws AuthenticationException;
52: }
|