View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  package org.apache.directory.server.kerberos.shared.messages.value.flags;
21  
22  /**
23   * An enum to describe all the TicketFlag possible values.
24   * 
25   *  TicketFlags     ::= KerberosFlags
26   *           -- reserved(0),
27   *           -- forwardable(1),
28   *           -- forwarded(2),
29   *           -- proxiable(3),
30   *           -- proxy(4),
31   *           -- may-postdate(5),
32   *           -- postdated(6),
33   *           -- invalid(7),
34   *           -- renewable(8),
35   *           -- initial(9),
36   *           -- pre-authent(10),
37   *           -- hw-authent(11),
38   *       -- the following are new since 1510
39   *           -- transited-policy-checked(12),
40   *           -- ok-as-delegate(13)
41   *
42   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
43   * @version $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Tue, 22 May 2007) $
44   */
45  public enum TicketFlag implements KerberosFlag
46  {
47      /**
48       * Ticket flag - reserved
49       */
50      RESERVED(0),
51  
52      /**
53       * Ticket flag - forwardable
54       */
55      FORWARDABLE(1),
56  
57      /**
58       * Ticket flag - forwarded
59       */
60      FORWARDED(2),
61  
62      /**
63       * Ticket flag - proxiable
64       */
65      PROXIABLE(3),
66  
67      /**
68       * Ticket flag - proxy
69       */
70      PROXY(4),
71  
72      /**
73       * Ticket flag - may be postdated
74       */
75      MAY_POSTDATE(5),
76  
77      /**
78       * Ticket flag - postdated
79       */
80      POSTDATED(6),
81      /**
82       * Ticket flag - invalid
83       */
84      INVALID(7),
85  
86      /**
87       * Ticket flag - renewable
88       */
89      RENEWABLE(8),
90  
91      /**
92       * Ticket flag - initial
93       */
94      INITIAL(9),
95  
96      /**
97       * Ticket flag - pre-authentication
98       */
99      PRE_AUTHENT(10),
100 
101     /**
102      * Ticket flag - hardware authentication
103      */
104     HW_AUTHENT(11),
105 
106     /**
107      * Ticket flag - transitedEncoding policy checked
108      */
109     TRANSITED_POLICY_CHECKED(12),
110 
111     /**
112      * Ticket flag - OK as delegate
113      */
114     OK_AS_DELEGATE(13),
115 
116     /**
117      * Ticket flag - maximum value
118      */
119     MAX_VALUE(32);
120 
121     
122     // The interned value.
123     private int value;
124     
125     
126     /**
127      * Class constructor
128      */
129     private TicketFlag( int value )
130     {
131         this.value = value;
132     }
133     
134     
135     /**
136      * @return The ordinal value associated with this flag
137      */
138     public int getOrdinal()
139     {
140         return value;
141     }
142 }