001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 *
019 */
020 package org.apache.directory.server.kerberos.shared.messages.value.flags;
021
022 /**
023 * An enum to describe all the TicketFlag possible values.
024 *
025 * TicketFlags ::= KerberosFlags
026 * -- reserved(0),
027 * -- forwardable(1),
028 * -- forwarded(2),
029 * -- proxiable(3),
030 * -- proxy(4),
031 * -- may-postdate(5),
032 * -- postdated(6),
033 * -- invalid(7),
034 * -- renewable(8),
035 * -- initial(9),
036 * -- pre-authent(10),
037 * -- hw-authent(11),
038 * -- the following are new since 1510
039 * -- transited-policy-checked(12),
040 * -- ok-as-delegate(13)
041 *
042 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
043 * @version $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Tue, 22 May 2007) $
044 */
045 public enum TicketFlag implements KerberosFlag
046 {
047 /**
048 * Ticket flag - reserved
049 */
050 RESERVED(0),
051
052 /**
053 * Ticket flag - forwardable
054 */
055 FORWARDABLE(1),
056
057 /**
058 * Ticket flag - forwarded
059 */
060 FORWARDED(2),
061
062 /**
063 * Ticket flag - proxiable
064 */
065 PROXIABLE(3),
066
067 /**
068 * Ticket flag - proxy
069 */
070 PROXY(4),
071
072 /**
073 * Ticket flag - may be postdated
074 */
075 MAY_POSTDATE(5),
076
077 /**
078 * Ticket flag - postdated
079 */
080 POSTDATED(6),
081 /**
082 * Ticket flag - invalid
083 */
084 INVALID(7),
085
086 /**
087 * Ticket flag - renewable
088 */
089 RENEWABLE(8),
090
091 /**
092 * Ticket flag - initial
093 */
094 INITIAL(9),
095
096 /**
097 * Ticket flag - pre-authentication
098 */
099 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 }