KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > authenticator > Constants


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18
19 package org.apache.catalina.authenticator;
20
21
22 public class Constants {
23
24     public static final String JavaDoc Package = "org.apache.catalina.authenticator";
25
26     // Authentication methods for login configuration
27
public static final String JavaDoc BASIC_METHOD = "BASIC";
28     public static final String JavaDoc CERT_METHOD = "CLIENT-CERT";
29     public static final String JavaDoc DIGEST_METHOD = "DIGEST";
30     public static final String JavaDoc FORM_METHOD = "FORM";
31
32     // User data constraints for transport guarantee
33
public static final String JavaDoc NONE_TRANSPORT = "NONE";
34     public static final String JavaDoc INTEGRAL_TRANSPORT = "INTEGRAL";
35     public static final String JavaDoc CONFIDENTIAL_TRANSPORT = "CONFIDENTIAL";
36
37     // Form based authentication constants
38
public static final String JavaDoc FORM_ACTION = "/j_security_check";
39     public static final String JavaDoc FORM_PASSWORD = "j_password";
40     public static final String JavaDoc FORM_USERNAME = "j_username";
41
42     // Cookie name for single sign on support
43
public static final String JavaDoc SINGLE_SIGN_ON_COOKIE = "JSESSIONIDSSO";
44
45
46     // --------------------------------------------------------- Request Notes
47

48
49     /**
50      * <p>If a user has been authenticated by the web layer, by means of a
51      * login method other than CLIENT_CERT, the username and password
52      * used to authenticate the user will be attached to the request as
53      * Notes for use by other server components. A server component can
54      * also call several existing methods on Request to determine whether
55      * or not any user has been authenticated:</p>
56      * <ul>
57      * <li><strong>request.getAuthType()</strong>
58      * will return BASIC, CLIENT-CERT, DIGEST, FORM, or <code>null</code>
59      * if there is no authenticated user.</li>
60      * <li><strong>request.getUserPrincipal()</strong>
61      * will return the authenticated <code>Principal</code> returned by the
62      * <code>Realm</code> that authenticated this user.</li>
63      * </ul>
64      * <p>If CLIENT_CERT authentication was performed, the certificate chain
65      * will be available as a request attribute, as defined in the
66      * servlet specification.</p>
67      */

68
69
70     /**
71      * The notes key for the password used to authenticate this user.
72      */

73     public static final String JavaDoc REQ_PASSWORD_NOTE =
74       "org.apache.catalina.request.PASSWORD";
75
76
77     /**
78      * The notes key for the username used to authenticate this user.
79      */

80     public static final String JavaDoc REQ_USERNAME_NOTE =
81       "org.apache.catalina.request.USERNAME";
82
83
84     /**
85      * The notes key to track the single-sign-on identity with which this
86      * request is associated.
87      */

88     public static final String JavaDoc REQ_SSOID_NOTE =
89       "org.apache.catalina.request.SSOID";
90
91
92     // ---------------------------------------------------------- Session Notes
93

94
95     /**
96      * If the <code>cache</code> property of our authenticator is set, and
97      * the current request is part of a session, authentication information
98      * will be cached to avoid the need for repeated calls to
99      * <code>Realm.authenticate()</code>, under the following keys:
100      */

101
102
103     /**
104      * The notes key for the password used to authenticate this user.
105      */

106     public static final String JavaDoc SESS_PASSWORD_NOTE =
107       "org.apache.catalina.session.PASSWORD";
108
109
110     /**
111      * The notes key for the username used to authenticate this user.
112      */

113     public static final String JavaDoc SESS_USERNAME_NOTE =
114       "org.apache.catalina.session.USERNAME";
115
116
117     /**
118      * The following note keys are used during form login processing to
119      * cache required information prior to the completion of authentication.
120      */

121
122
123     /**
124      * The previously authenticated principal (if caching is disabled).
125      */

126     public static final String JavaDoc FORM_PRINCIPAL_NOTE =
127         "org.apache.catalina.authenticator.PRINCIPAL";
128
129
130     /**
131      * The original request information, to which the user will be
132      * redirected if authentication succeeds.
133      */

134     public static final String JavaDoc FORM_REQUEST_NOTE =
135         "org.apache.catalina.authenticator.REQUEST";
136
137
138 }
139
Popular Tags