summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-06-01 10:56:10 +0200
committerVincent Petry <pvince81@owncloud.com>2016-06-01 10:56:10 +0200
commit7b4459d28d40523c70ec05a733e158f2c14faac4 (patch)
tree79f18f50a9c57b64583d508769011a61bcf3e298 /settings
parent0f2017c7da6332f66f05e93dd34ea1bf1c134148 (diff)
parentc58d8159d7bdee93a67a917e16b750fe99df9f99 (diff)
downloadnextcloud-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.php7
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);