KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > security > auth > AuthenticationStatus


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.security.auth;
24
25 /**
26  * This interface stores the status of the authentication.
27  * @author Harish Prabandham
28  */

29
30 public interface AuthenticationStatus extends java.io.Serializable JavaDoc {
31     public static final int AUTH_SUCCESS = 0; // Authentication Successful
32
public static final int AUTH_FAILURE = 1; // Authentication Failed
33
public static final int AUTH_CONTINUE = 2; // Continue the Authentication
34
public static final int AUTH_EXPIRED = 3; // Credentials have expired.
35

36     /**
37      * This method returns the status of the authentication
38      * @return An integer value indicating the status of the authentication
39      */

40     public int getStatus();
41     
42     /**
43      * This is the value returned by the Authenticator when the status
44      * is AUTH_CONTINUE. This data should give an indication to the
45      * client on what else it should send to the server to complete the
46      * authentication.
47      *
48      * @return An array of bytes indicating the additional information
49      * needed to complete the authentication.
50      */

51     public byte[] getContinuationData();
52     
53     /**
54      * This is the value returned by the Authenticator when the status
55      * is AUTH_CONTINUE. This data should give an indication to the
56      * client on specific authentication it needs to adopt to continue
57      * on with the authentication.
58      *
59      * @return An array of bytes indicating the authentication specific
60      * information needed to complete the authentication.
61      */

62     public byte[] getAuthSpecificData();
63 }
64
65
66
67
68
Popular Tags