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.server.kerberos.changepwd.service; 021 022 023import java.net.InetAddress; 024 025import org.apache.directory.server.kerberos.ChangePasswordConfig; 026import org.apache.directory.server.kerberos.changepwd.messages.AbstractPasswordMessage; 027import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler; 028import org.apache.directory.server.kerberos.shared.replay.ReplayCache; 029import org.apache.directory.server.kerberos.shared.store.PrincipalStore; 030import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry; 031import org.apache.directory.shared.kerberos.messages.ApReq; 032import org.apache.directory.shared.kerberos.messages.Authenticator; 033import org.apache.directory.shared.kerberos.messages.ChangePasswdData; 034import org.apache.directory.shared.kerberos.messages.Ticket; 035 036 037/** 038 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 039 */ 040public class ChangePasswordContext 041{ 042 private ChangePasswordConfig config; 043 private PrincipalStore store; 044 private AbstractPasswordMessage request; 045 private AbstractPasswordMessage reply; 046 private InetAddress clientAddress; 047 048 private ApReq authHeader; 049 private Ticket ticket; 050 private Authenticator authenticator; 051 private PrincipalStoreEntry serverEntry; 052 private CipherTextHandler cipherTextHandler; 053 054 private ReplayCache replayCache; 055 056 private ChangePasswdData passwordData; 057 058 /** 059 * @return Returns the serverEntry. 060 */ 061 public PrincipalStoreEntry getServerEntry() 062 { 063 return serverEntry; 064 } 065 066 067 /** 068 * @param serverEntry The serverEntry to set. 069 */ 070 public void setServerEntry( PrincipalStoreEntry serverEntry ) 071 { 072 this.serverEntry = serverEntry; 073 } 074 075 076 /** 077 * @return gets the config. 078 */ 079 public ChangePasswordConfig getConfig() 080 { 081 return config; 082 } 083 084 085 /** 086 * @param config The config to set. 087 */ 088 public void setConfig( ChangePasswordConfig config ) 089 { 090 this.config = config; 091 } 092 093 094 /** 095 * @return Returns the reply. 096 */ 097 public AbstractPasswordMessage getReply() 098 { 099 return reply; 100 } 101 102 103 /** 104 * @param reply The reply to set. 105 */ 106 public void setReply( AbstractPasswordMessage reply ) 107 { 108 this.reply = reply; 109 } 110 111 112 /** 113 * @return Returns the request. 114 */ 115 public AbstractPasswordMessage getRequest() 116 { 117 return request; 118 } 119 120 121 /** 122 * @param request The request to set. 123 */ 124 public void setRequest( AbstractPasswordMessage request ) 125 { 126 this.request = request; 127 } 128 129 130 /** 131 * @return Returns the store. 132 */ 133 public PrincipalStore getStore() 134 { 135 return store; 136 } 137 138 139 /** 140 * @param store The store to set. 141 */ 142 public void setStore( PrincipalStore store ) 143 { 144 this.store = store; 145 } 146 147 148 /** 149 * @return Returns the {@link CipherTextHandler}. 150 */ 151 public CipherTextHandler getCipherTextHandler() 152 { 153 return cipherTextHandler; 154 } 155 156 157 /** 158 * @param cipherTextHandler The {@link CipherTextHandler} to set. 159 */ 160 public void setCipherTextHandler( CipherTextHandler cipherTextHandler ) 161 { 162 this.cipherTextHandler = cipherTextHandler; 163 } 164 165 166 /** 167 * @return Returns the authenticator. 168 */ 169 public Authenticator getAuthenticator() 170 { 171 return authenticator; 172 } 173 174 175 /** 176 * @param authenticator The authenticator to set. 177 */ 178 public void setAuthenticator( Authenticator authenticator ) 179 { 180 this.authenticator = authenticator; 181 } 182 183 184 /** 185 * @return Returns the authHeader. 186 */ 187 public ApReq getAuthHeader() 188 { 189 return authHeader; 190 } 191 192 193 /** 194 * @param authHeader The authHeader to set. 195 */ 196 public void setAuthHeader( ApReq authHeader ) 197 { 198 this.authHeader = authHeader; 199 } 200 201 202 /** 203 * @return Returns the ticket. 204 */ 205 public Ticket getTicket() 206 { 207 return ticket; 208 } 209 210 211 /** 212 * @param ticket The ticket to set. 213 */ 214 public void setTicket( Ticket ticket ) 215 { 216 this.ticket = ticket; 217 } 218 219 220 /** 221 * @return Returns the clientAddress. 222 */ 223 public InetAddress getClientAddress() 224 { 225 return clientAddress; 226 } 227 228 229 /** 230 * @param clientAddress The clientAddress to set. 231 */ 232 public void setClientAddress( InetAddress clientAddress ) 233 { 234 this.clientAddress = clientAddress; 235 } 236 237 238 public ChangePasswdData getPasswordData() 239 { 240 return passwordData; 241 } 242 243 244 public void setChngPwdData( ChangePasswdData passwordData ) 245 { 246 this.passwordData = passwordData; 247 } 248 249 250 public ReplayCache getReplayCache() 251 { 252 return replayCache; 253 } 254 255 256 public void setReplayCache( ReplayCache replayCache ) 257 { 258 this.replayCache = replayCache; 259 } 260}