aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-09 13:59:48 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-09 13:59:48 +0100
commit0ac38198ab1c00dfb290d5631fa7c1cf5ac2a48a (patch)
tree29f468b3fc503fea223a471539959ccd80840c57 /src/Wallabag
parent89c03230c3d51e618608b044b0e3f45cf0c06a11 (diff)
downloadwallabag-0ac38198ab1c00dfb290d5631fa7c1cf5ac2a48a.tar.gz
wallabag-0ac38198ab1c00dfb290d5631fa7c1cf5ac2a48a.tar.zst
wallabag-0ac38198ab1c00dfb290d5631fa7c1cf5ac2a48a.zip
authentication on API
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
index 5499f400..eaad9c63 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
+++ b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
@@ -44,6 +44,12 @@ class WsseProvider implements AuthenticationProviderInterface
44 if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) { 44 if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) {
45 throw new NonceExpiredException('Previously used nonce detected'); 45 throw new NonceExpiredException('Previously used nonce detected');
46 } 46 }
47
48 // If cache directory does not exist we create it
49 if (!is_dir($this->cacheDir)) {
50 mkdir($this->cacheDir, 0777, true);
51 }
52
47 file_put_contents($this->cacheDir.'/'.$nonce, time()); 53 file_put_contents($this->cacheDir.'/'.$nonce, time());
48 54
49 // Valide le Secret 55 // Valide le Secret