]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
authentication on API
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Security / Authentication / Provider / WsseProvider.php
index 5499f4007d411323f37c2af41e3b0a2fa77ac5ba..eaad9c6335b03d1b7d1fa9330e1352fc789b13f9 100644 (file)
@@ -44,6 +44,12 @@ class WsseProvider implements AuthenticationProviderInterface
         if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) {
             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());
 
         // Valide le Secret