KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > repo > security > authentication > TicketComponent


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.repo.security.authentication;
18
19
20 /**
21  * Manage authentication tickets
22  *
23  * @author andyh
24  *
25  */

26 public interface TicketComponent
27 {
28     /**
29      * Register a ticket
30      *
31      * @param authentication
32      * @return
33      * @throws AuthenticationException
34      */

35     public String JavaDoc getTicket(String JavaDoc userName) throws AuthenticationException;
36
37     /**
38      * Check that a certificate is valid and can be used in place of a login.
39      *
40      * Tickets may be rejected because:
41      * <ol>
42      * <li> The certificate does not exists
43      * <li> The status of the user has changed
44      * <ol>
45      * <li> The user is locked
46      * <li> The account has expired
47      * <li> The credentials have expired
48      * <li> The account is disabled
49      * </ol>
50      * <li> The ticket may have expired
51      * <ol>
52      * <li> The ticked my be invalid by timed expiry
53      * <li> An attemp to reuse a once only ticket
54      * </ol>
55      * </ol>
56      *
57      * @param authentication
58      * @return
59      * @throws AuthenticationException
60      */

61     public String JavaDoc validateTicket(String JavaDoc ticket) throws AuthenticationException;
62     
63     public void invalidateTicketById(String JavaDoc ticket);
64     
65     public void invalidateTicketByUser(String JavaDoc userName);
66 }
67
Popular Tags