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;
021
022
023 import javax.security.auth.kerberos.KerberosPrincipal;
024
025 import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
026
027
028 /**
029 * Kerberos credential information.
030 *
031 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
032 * @version $Rev: 591019 $, $Date: 2007-11-01 16:16:34 +0200 (Thu, 01 Nov 2007) $
033 */
034 public class KrbCredInfo
035 {
036 private EncryptionKey key;
037 private KerberosPrincipal clientPrincipal; //optional
038 private TicketFlags flags; //optional
039 private KerberosTime authTime; //optional
040 private KerberosTime startTime; //optional
041 private KerberosTime endTime; //optional
042 private KerberosTime renewTill; //optional
043 private KerberosPrincipal serverPrincipal; //optional
044 private HostAddresses clientAddresses; //optional
045
046
047 /**
048 * Creates a new instance of KrbCredInfo.
049 *
050 * @param key
051 * @param clientPrincipal
052 * @param flags
053 * @param authTime
054 * @param startTime
055 * @param endTime
056 * @param renewTill
057 * @param serverPrincipal
058 * @param clientAddresses
059 */
060 public KrbCredInfo( EncryptionKey key, KerberosPrincipal clientPrincipal, TicketFlags flags, KerberosTime authTime,
061 KerberosTime startTime, KerberosTime endTime, KerberosTime renewTill, KerberosPrincipal serverPrincipal,
062 HostAddresses clientAddresses )
063 {
064 this.key = key;
065 this.clientPrincipal = clientPrincipal;
066 this.flags = flags;
067 this.authTime = authTime;
068 this.startTime = startTime;
069 this.endTime = endTime;
070 this.renewTill = renewTill;
071 this.serverPrincipal = serverPrincipal;
072 this.clientAddresses = clientAddresses;
073 }
074
075
076 /**
077 * Returns the auth {@link KerberosTime}.
078 *
079 * @return The auth {@link KerberosTime}.
080 */
081 public KerberosTime getAuthTime()
082 {
083 return authTime;
084 }
085
086
087 /**
088 * Returns the client {@link HostAddresses}.
089 *
090 * @return The client {@link HostAddresses}.
091 */
092 public HostAddresses getClientAddresses()
093 {
094 return clientAddresses;
095 }
096
097
098 /**
099 * Returns the end {@link KerberosTime}.
100 *
101 * @return The end {@link KerberosTime}.
102 */
103 public KerberosTime getEndTime()
104 {
105 return endTime;
106 }
107
108
109 /**
110 * Returns the {@link TicketFlags}.
111 *
112 * @return The {@link TicketFlags}.
113 */
114 public TicketFlags getFlags()
115 {
116 return flags;
117 }
118
119
120 /**
121 * Returns the {@link EncryptionKey}.
122 *
123 * @return The {@link EncryptionKey}.
124 */
125 public EncryptionKey getKey()
126 {
127 return key;
128 }
129
130
131 /**
132 * Returns the client {@link KerberosPrincipal}.
133 *
134 * @return The client {@link KerberosPrincipal}.
135 */
136 public KerberosPrincipal getClientPrincipal()
137 {
138 return clientPrincipal;
139 }
140
141
142 /**
143 * Returns the renew till {@link KerberosTime}.
144 *
145 * @return The renew till {@link KerberosTime}.
146 */
147 public KerberosTime getRenewTill()
148 {
149 return renewTill;
150 }
151
152
153 /**
154 * Returns the server {@link KerberosPrincipal}.
155 *
156 * @return The server {@link KerberosPrincipal}.
157 */
158 public KerberosPrincipal getServerPrincipal()
159 {
160 return serverPrincipal;
161 }
162
163
164 /**
165 * Returns the start {@link KerberosTime}.
166 *
167 * @return The start {@link KerberosTime}.
168 */
169 public KerberosTime getStartTime()
170 {
171 return startTime;
172 }
173 }