summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-20 09:23:57 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2018-11-20 10:51:07 +0000
commit1794c3fdea44504a8ff6e452e15d00869294d9b9 (patch)
tree9f0f54392abc6b9d271016fa65b60f6666f42ae5 /lib/private
parent9939540ce40ece3c87b829812fabc897c6b23803 (diff)
downloadnextcloud-server-1794c3fdea44504a8ff6e452e15d00869294d9b9.tar.gz
nextcloud-server-1794c3fdea44504a8ff6e452e15d00869294d9b9.zip
Bearer tokens are app token
Fixes #12498 This means that we set that it is a proper app token once it is validated. This will allow the 2FA middleware to just run the same check. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/User/Session.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 1859acf9e80..a06ce1a7c1e 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -774,6 +774,10 @@ class Session implements IUserSession, Emitter {
if(!$this->validateToken($token)) {
return false;
}
+
+ // Set the session variable so we know this is an app password
+ $this->session->set('app_password', $token);
+
return true;
}