summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-05-04 23:46:59 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-05-18 20:49:03 +0200
commit5f71805c35d04e585ea6d4227254b11204413dfd (patch)
treee2de66eb03b7127ff542393089013cda526df781 /lib
parent879e11e7d1d9802647ade392f4ae317952bc6f8f (diff)
downloadnextcloud-server-5f71805c35d04e585ea6d4227254b11204413dfd.tar.gz
nextcloud-server-5f71805c35d04e585ea6d4227254b11204413dfd.zip
Add basic implementation for OAuth 2.0 Authorization Code Flow
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/User/Session.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index f818666c374..0291c1baecb 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -725,7 +725,7 @@ class Session implements IUserSession, Emitter {
*/
public function tryTokenLogin(IRequest $request) {
$authHeader = $request->getHeader('Authorization');
- if (strpos($authHeader, 'token ') === false) {
+ if (strpos($authHeader, 'Bearer ') === false) {
// No auth header, let's try session id
try {
$token = $this->session->getId();
@@ -733,7 +733,7 @@ class Session implements IUserSession, Emitter {
return false;
}
} else {
- $token = substr($authHeader, 6);
+ $token = substr($authHeader, 7);
}
if (!$this->loginWithToken($token)) {