Skip to content
Snippets Groups Projects
Commit 54b1ac3e authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Automatically create temp directory for OAuth Storage

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1657 44740490-163a-0410-bde0-09ae8108e29a
parent b73e5e43
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,13 @@ class sspmod_oauth_OAuthStore extends OAuthDataStore { ...@@ -14,6 +14,13 @@ class sspmod_oauth_OAuthStore extends OAuthDataStore {
private $path; private $path;
function __construct($path = '/tmp/oauth/') { function __construct($path = '/tmp/oauth/') {
if (!file_exists($path)) {
mkdir($path);
} else {
if (!is_dir($path))
throw new Exception('OAuth Storage Path [' . $path . '] is not a valid directory');
}
$this->path = $path; $this->path = $path;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment