aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
index c9b9b692..7e6a5dfb 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
+++ b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
@@ -17,6 +17,11 @@ class WsseProvider implements AuthenticationProviderInterface
17 { 17 {
18 $this->userProvider = $userProvider; 18 $this->userProvider = $userProvider;
19 $this->cacheDir = $cacheDir; 19 $this->cacheDir = $cacheDir;
20
21 // If cache directory does not exist we create it
22 if (!is_dir($this->cacheDir)) {
23 mkdir($this->cacheDir, 0777, true);
24 }
20 } 25 }
21 26
22 public function authenticate(TokenInterface $token) 27 public function authenticate(TokenInterface $token)
@@ -54,11 +59,6 @@ class WsseProvider implements AuthenticationProviderInterface
54 throw new NonceExpiredException('Previously used nonce detected'); 59 throw new NonceExpiredException('Previously used nonce detected');
55 } 60 }
56 61
57 // If cache directory does not exist we create it
58 if (!is_dir($this->cacheDir)) {
59 mkdir($this->cacheDir, 0777, true);
60 }
61
62 file_put_contents($this->cacheDir.'/'.$nonce, time()); 62 file_put_contents($this->cacheDir.'/'.$nonce, time());
63 63
64 // Validate Secret 64 // Validate Secret