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.kdc.authentication;
21
22
23 import org.apache.directory.server.kerberos.kdc.KdcContext;
24 import org.apache.directory.server.kerberos.shared.messages.components.Ticket;
25 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
26 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
27 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
28
29
30 /**
31 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
32 * @version $Rev: 642496 $, $Date: 2008-03-29 04:09:22 +0100 (Sa, 29 Mär 2008) $
33 */
34 public class AuthenticationContext extends KdcContext
35 {
36 private static final long serialVersionUID = -2249170923251265359L;
37
38 //private Map checksumEngines = new HashMap();
39
40 private Ticket ticket;
41 private EncryptionKey clientKey;
42 private ReplayCache replayCache;
43
44 private PrincipalStoreEntry clientEntry;
45 private PrincipalStoreEntry serverEntry;
46
47 private boolean isPreAuthenticated;
48
49
50 /**
51 * @return Returns the serverEntry.
52 */
53 public PrincipalStoreEntry getServerEntry()
54 {
55 return serverEntry;
56 }
57
58
59 /**
60 * @param serverEntry The serverEntry to set.
61 */
62 public void setServerEntry( PrincipalStoreEntry serverEntry )
63 {
64 this.serverEntry = serverEntry;
65 }
66
67
68 /**
69 * @return Returns the clientEntry.
70 */
71 public PrincipalStoreEntry getClientEntry()
72 {
73 return clientEntry;
74 }
75
76
77 /**
78 * @param clientEntry The clientEntry to set.
79 */
80 public void setClientEntry( PrincipalStoreEntry clientEntry )
81 {
82 this.clientEntry = clientEntry;
83 }
84
85
86 /**
87 * @return Returns the checksumEngines.
88 *
89 public Map getChecksumEngines()
90 {
91 return checksumEngines;
92 }
93 */
94
95 /**
96 * @param checksumEngines The checksumEngines to set.
97 *
98 public void setChecksumEngines( Map checksumEngines )
99 {
100 this.checksumEngines = checksumEngines;
101 }
102 */
103
104
105 /**
106 * @return Returns the replayCache.
107 */
108 public ReplayCache getReplayCache()
109 {
110 return replayCache;
111 }
112
113
114 /**
115 * @param replayCache The replayCache to set.
116 */
117 public void setReplayCache( ReplayCache replayCache )
118 {
119 this.replayCache = replayCache;
120 }
121
122
123 /**
124 * @return Returns the clientKey.
125 */
126 public EncryptionKey getClientKey()
127 {
128 return clientKey;
129 }
130
131
132 /**
133 * @param clientKey The clientKey to set.
134 */
135 public void setClientKey( EncryptionKey clientKey )
136 {
137 this.clientKey = clientKey;
138 }
139
140
141 /**
142 * @return Returns the ticket.
143 */
144 public Ticket getTicket()
145 {
146 return ticket;
147 }
148
149
150 /**
151 * @param ticket The ticket to set.
152 */
153 public void setTicket( Ticket ticket )
154 {
155 this.ticket = ticket;
156 }
157
158
159 /**
160 * @return true if the client used pre-authentication.
161 */
162 public boolean isPreAuthenticated()
163 {
164 return isPreAuthenticated;
165 }
166
167
168 /**
169 * @param isPreAuthenticated Whether the client used pre-authentication.
170 */
171 public void setPreAuthenticated( boolean isPreAuthenticated )
172 {
173 this.isPreAuthenticated = isPreAuthenticated;
174 }
175 }