mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 09:31:04 +00:00
move dir check into constructor
This commit is contained in:
parent
d4c029f46e
commit
92504e0dd4
1 changed files with 5 additions and 5 deletions
|
@ -17,6 +17,11 @@ class WsseProvider implements AuthenticationProviderInterface
|
|||
{
|
||||
$this->userProvider = $userProvider;
|
||||
$this->cacheDir = $cacheDir;
|
||||
|
||||
// If cache directory does not exist we create it
|
||||
if (!is_dir($this->cacheDir)) {
|
||||
mkdir($this->cacheDir, 0777, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function authenticate(TokenInterface $token)
|
||||
|
@ -54,11 +59,6 @@ class WsseProvider implements AuthenticationProviderInterface
|
|||
throw new NonceExpiredException('Previously used nonce detected');
|
||||
}
|
||||
|
||||
// If cache directory does not exist we create it
|
||||
if (!is_dir($this->cacheDir)) {
|
||||
mkdir($this->cacheDir, 0777, true);
|
||||
}
|
||||
|
||||
file_put_contents($this->cacheDir.'/'.$nonce, time());
|
||||
|
||||
// Validate Secret
|
||||
|
|
Loading…
Reference in a new issue