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.components;
021
022
023 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress;
024 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
025 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
026 import org.apache.directory.server.kerberos.shared.messages.value.KrbCredInfo;
027
028
029 /**
030 * Encrypted part of credential message types.
031 *
032 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
033 * @version $Rev: 540371 $, $Date: 2007-05-22 03:00:43 +0300 (Tue, 22 May 2007) $
034 */
035 public class EncKrbCredPart
036 {
037 private KrbCredInfo[] ticketInfo;
038 private Integer nonce; //optional
039 private KerberosTime timeStamp; //optional
040 private Integer usec; //optional
041 private HostAddress sAddress; //optional
042 private HostAddresses rAddress; //optional
043
044
045 /**
046 * Creates a new instance of EncKrbCredPart.
047 *
048 * @param ticketInfo
049 * @param timeStamp
050 * @param usec
051 * @param nonce
052 * @param sAddress
053 * @param rAddress
054 */
055 public EncKrbCredPart( KrbCredInfo[] ticketInfo, KerberosTime timeStamp, Integer usec, Integer nonce,
056 HostAddress sAddress, HostAddresses rAddress )
057 {
058 this.ticketInfo = ticketInfo;
059 this.nonce = nonce;
060 this.timeStamp = timeStamp;
061 this.usec = usec;
062 this.sAddress = sAddress;
063 this.rAddress = rAddress;
064 }
065
066
067 /**
068 * Returns the nonce.
069 *
070 * @return The nonce.
071 */
072 public Integer getNonce()
073 {
074 return nonce;
075 }
076
077
078 /**
079 * Returns the "R" {@link HostAddresses}.
080 *
081 * @return The "R" {@link HostAddresses}.
082 */
083 public HostAddresses getRAddress()
084 {
085 return rAddress;
086 }
087
088
089 /**
090 * Returns the "S" {@link HostAddresses}.
091 *
092 * @return The "S" {@link HostAddresses}.
093 */
094 public HostAddress getSAddress()
095 {
096 return sAddress;
097 }
098
099
100 /**
101 * Returns the {@link KrbCredInfo}s.
102 *
103 * @return The {@link KrbCredInfo}s.
104 */
105 public KrbCredInfo[] getTicketInfo()
106 {
107 return ticketInfo;
108 }
109
110
111 /**
112 * Returns the timestamp.
113 *
114 * @return The timeStamp.
115 */
116 public KerberosTime getTimeStamp()
117 {
118 return timeStamp;
119 }
120
121
122 /**
123 * Returns the microseconds.
124 *
125 * @return The microseconds.
126 */
127 public Integer getUsec()
128 {
129 return usec;
130 }
131 }