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.components; 21 22 23 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress; 24 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses; 25 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime; 26 import org.apache.directory.server.kerberos.shared.messages.value.KrbCredInfo; 27 28 29 /** 30 * Encrypted part of credential message types. 31 * 32 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 33 * @version $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Di, 22 Mai 2007) $ 34 */ 35 public class EncKrbCredPart 36 { 37 private KrbCredInfo[] ticketInfo; 38 private Integer nonce; //optional 39 private KerberosTime timeStamp; //optional 40 private Integer usec; //optional 41 private HostAddress sAddress; //optional 42 private HostAddresses rAddress; //optional 43 44 45 /** 46 * Creates a new instance of EncKrbCredPart. 47 * 48 * @param ticketInfo 49 * @param timeStamp 50 * @param usec 51 * @param nonce 52 * @param sAddress 53 * @param rAddress 54 */ 55 public EncKrbCredPart( KrbCredInfo[] ticketInfo, KerberosTime timeStamp, Integer usec, Integer nonce, 56 HostAddress sAddress, HostAddresses rAddress ) 57 { 58 this.ticketInfo = ticketInfo; 59 this.nonce = nonce; 60 this.timeStamp = timeStamp; 61 this.usec = usec; 62 this.sAddress = sAddress; 63 this.rAddress = rAddress; 64 } 65 66 67 /** 68 * Returns the nonce. 69 * 70 * @return The nonce. 71 */ 72 public Integer getNonce() 73 { 74 return nonce; 75 } 76 77 78 /** 79 * Returns the "R" {@link HostAddresses}. 80 * 81 * @return The "R" {@link HostAddresses}. 82 */ 83 public HostAddresses getRAddress() 84 { 85 return rAddress; 86 } 87 88 89 /** 90 * Returns the "S" {@link HostAddresses}. 91 * 92 * @return The "S" {@link HostAddresses}. 93 */ 94 public HostAddress getSAddress() 95 { 96 return sAddress; 97 } 98 99 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 }