aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-24 17:51:49 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-24 17:51:49 +0200
commitd3fb5d618ea5902c989c39d72fd6ac2e5bcb65ed (patch)
tree815818e3077c629a5b5fe8a63213e4867546d5b6 /settings
parente8c37943081975b01f5dedc2284892a5335322f8 (diff)
parentad10485cec4377119aa14749e8e4aeda6e707f8e (diff)
downloadnextcloud-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.php3
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,