View Javadoc

    1   /* Copyright 2004 Acegi Technology Pty Limited
    2    *
    3    * Licensed under the Apache License, Version 2.0 (the "License");
    4    * you may not use this file except in compliance with the License.
    5    * You may obtain a copy of the License at
    6    *
    7    *     http://www.apache.org/licenses/LICENSE-2.0
    8    *
    9    * 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  /***
    22   * Validates a CAS service ticket.
    23   *
    24   * <P>
    25   * Implementations must accept CAS proxy tickets, in addition to CAS service
    26   * tickets. If proxy tickets should be rejected, this is resolved by a {@link
    27   * CasProxyDecider} implementation (not by the <code>TicketValidator</code>).
    28   * </p>
    29   *
    30   * <P>
    31   * Implementations may request a proxy granting ticket if wish,  although this
    32   * behaviour is not mandatory.
    33   * </p>
    34   *
    35   * @author Ben Alex
    36   * @version $Id: TicketValidator.java,v 1.2 2005/11/17 00:55:47 benalex Exp $
    37   */
    38  public interface TicketValidator {
    39      //~ Methods ================================================================
    40
    41      /***
    42       * Returns information about the ticket, if it is valid for this service.
    43       *
    44       * <P>
    45       * Must throw an <code>AuthenticationException</code> if the ticket is not
    46       * valid for this service.
    47       * </p>
    48       *
    49       * @return details of the CAS service ticket
    50       */
    51      public TicketResponse confirmTicketValid(String serviceTicket)
    52          throws AuthenticationException;
    53  }