diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-05-31 10:48:14 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@owncloud.com> | 2016-05-31 17:07:49 +0200 |
commit | c58d8159d7bdee93a67a917e16b750fe99df9f99 (patch) | |
tree | 568acfd8c2f26bd675a151bb42130a626468633b /settings/Controller | |
parent | 9a9c1b9439055fc6ad9f8372b354e4fc7ce3bc02 (diff) | |
download | nextcloud-server-c58d8159d7bdee93a67a917e16b750fe99df9f99.tar.gz nextcloud-server-c58d8159d7bdee93a67a917e16b750fe99df9f99.zip |
Create session tokens for apache auth users
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 2417f5f8218..fba663b034d 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -23,6 +23,7 @@ namespace OC\Settings\Controller; use OC\AppFramework\Http; use OC\Authentication\Exceptions\InvalidTokenException; +use OC\Authentication\Exceptions\PasswordlessTokenException; use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; use OCP\AppFramework\Controller; @@ -101,7 +102,11 @@ class AuthSettingsController extends Controller { try { $sessionToken = $this->tokenProvider->getToken($sessionId); $loginName = $sessionToken->getLoginName(); - $password = $this->tokenProvider->getPassword($sessionToken, $sessionId); + try { + $password = $this->tokenProvider->getPassword($sessionToken, $sessionId); + } catch (PasswordlessTokenException $ex) { + $password = null; + } } catch (InvalidTokenException $ex) { $resp = new JSONResponse(); $resp->setStatus(Http::STATUS_SERVICE_UNAVAILABLE); |