@@ -212,12 +212,12 @@ the ``PasswordDigest`` header value matches with the user's password::
212
212
class WsseProvider implements AuthenticationProviderInterface
213
213
{
214
214
private $userProvider;
215
- private $cacheDir ;
215
+ private $cacheDirectory ;
216
216
217
- public function __construct(UserProviderInterface $userProvider, $cacheDir )
217
+ public function __construct(UserProviderInterface $userProvider, $cacheDirectory )
218
218
{
219
- $this->userProvider = $userProvider;
220
- $this->cacheDir = $cacheDir ;
219
+ $this->userProvider = $userProvider;
220
+ $this->cacheDirectory = $cacheDirectory ;
221
221
}
222
222
223
223
public function authenticate(TokenInterface $token)
@@ -255,16 +255,16 @@ the ``PasswordDigest`` header value matches with the user's password::
255
255
// Validate that the nonce is *not* used in the last 5 minutes
256
256
// if it has, this could be a replay attack
257
257
if (
258
- file_exists($this->cacheDir .'/'.md5($nonce))
259
- && file_get_contents($this->cacheDir .'/'.md5($nonce)) + 300 > time()
258
+ file_exists($this->cacheDirectory .'/'.md5($nonce))
259
+ && file_get_contents($this->cacheDirectory .'/'.md5($nonce)) + 300 > time()
260
260
) {
261
261
throw new NonceExpiredException('Previously used nonce detected');
262
262
}
263
263
// If cache directory does not exist we create it
264
- if (!is_dir($this->cacheDir )) {
265
- mkdir($this->cacheDir , 0777, true);
264
+ if (!is_dir($this->cacheDirectory )) {
265
+ mkdir($this->cacheDirectory , 0777, true);
266
266
}
267
- file_put_contents($this->cacheDir .'/'.md5($nonce), time());
267
+ file_put_contents($this->cacheDirectory .'/'.md5($nonce), time());
268
268
269
269
// Validate Secret
270
270
$expected = base64_encode(sha1(base64_decode($nonce).$created.$secret, true));
0 commit comments