diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-01 10:56:10 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-01 10:56:10 +0200 |
commit | 7b4459d28d40523c70ec05a733e158f2c14faac4 (patch) | |
tree | 79f18f50a9c57b64583d508769011a61bcf3e298 /settings | |
parent | 0f2017c7da6332f66f05e93dd34ea1bf1c134148 (diff) | |
parent | c58d8159d7bdee93a67a917e16b750fe99df9f99 (diff) | |
download | nextcloud-server-7b4459d28d40523c70ec05a733e158f2c14faac4.tar.gz nextcloud-server-7b4459d28d40523c70ec05a733e158f2c14faac4.zip |
Merge pull request #24912 from owncloud/session-tokens-apache-auth
Create session tokens for apache auth users
Diffstat (limited to 'settings')
-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); |