mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
authentication on API
This commit is contained in:
parent
89c03230c3
commit
0ac38198ab
2 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue