diff --git a/modules/oauth/lib/OAuthStore.php b/modules/oauth/lib/OAuthStore.php index 20e8ab3f49dcb5f45ae4c5734cf949fbc4f6e7e4..21cd761820b82e4bb364f1353432038e39ac86ae 100644 --- a/modules/oauth/lib/OAuthStore.php +++ b/modules/oauth/lib/OAuthStore.php @@ -14,6 +14,13 @@ class sspmod_oauth_OAuthStore extends OAuthDataStore { private $path; 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; }