diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-24 17:51:49 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-24 17:51:49 +0200 |
commit | d3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed (patch) | |
tree | 815818e3077c629a5b5fe8a63213e4867546d5b6 /settings | |
parent | e8c37943081975b01f5dedc2284892a5335322f8 (diff) | |
parent | ad10485cec4377119aa14749e8e4aeda6e707f8e (diff) | |
download | nextcloud-server-d3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed.tar.gz nextcloud-server-d3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed.zip |
Merge pull request #24748 from owncloud/login-explicitly
Log in explicitly, save login name when generating browser/device tokens
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 75311920d2a..826e6b87033 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -101,6 +101,7 @@ class AuthSettingsController extends Controller { try { $sessionToken = $this->tokenProvider->getToken($sessionId); + $loginName = $sessionToken->getLoginName(); $password = $this->tokenProvider->getPassword($sessionToken, $sessionId); } catch (InvalidTokenException $ex) { $resp = new JSONResponse(); @@ -109,7 +110,7 @@ class AuthSettingsController extends Controller { } $token = $this->generateRandomDeviceToken(); - $deviceToken = $this->tokenProvider->generateToken($token, $this->uid, $password, $name, IToken::PERMANENT_TOKEN); + $deviceToken = $this->tokenProvider->generateToken($token, $this->uid, $loginName, $password, $name, IToken::PERMANENT_TOKEN); return [ 'token' => $token, |