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 */
020package org.apache.directory.shared.kerberos.flags;
021
022
023/**
024 * An enum to describe all the TicketFlag possible values.
025 * 
026 *  TicketFlags     ::= KerberosFlags
027 *           -- reserved(0),
028 *           -- forwardable(1),
029 *           -- forwarded(2),
030 *           -- proxiable(3),
031 *           -- proxy(4),
032 *           -- may-postdate(5),
033 *           -- postdated(6),
034 *           -- invalid(7),
035 *           -- renewable(8),
036 *           -- initial(9),
037 *           -- pre-authent(10),
038 *           -- hw-authent(11),
039 *       -- the following are new since 1510
040 *           -- transited-policy-checked(12),
041 *           -- ok-as-delegate(13)
042 *
043 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
044 */
045public 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    // The interned value.
122    private int value;
123
124
125    /**
126     * Class constructor
127     */
128    private TicketFlag( int value )
129    {
130        this.value = value;
131    }
132
133
134    /**
135     * @return The value associated with this flag
136     */
137    public int getValue()
138    {
139        return value;
140    }
141}