Skip to content

Commit

Permalink
Bearer tokens are app token
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rullzer authored and Backportbot committed Nov 20, 2018
1 parent b4a410e commit adf1488
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/User/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ public function tryTokenLogin(IRequest $request) {
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;
}

Expand Down

0 comments on commit adf1488

Please sign in to comment.