From 699289cd26d3101c18b72e287de77282c782c9cc Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 29 Apr 2016 14:00:07 +0200 Subject: pass in $request on OCS api --- lib/private/User/Session.php | 2 ++ lib/private/legacy/api.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index b72e4e1a1ed..72fb8bc41d0 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -330,6 +330,8 @@ class Session implements IUserSession, Emitter { /** * Tries to login the user with HTTP Basic Authentication + * + * @param IRequest $request * @return boolean if the login was successful */ public function tryBasicAuthLogin(IRequest $request) { diff --git a/lib/private/legacy/api.php b/lib/private/legacy/api.php index 3fcd9a93ec1..e3d597fc64e 100644 --- a/lib/private/legacy/api.php +++ b/lib/private/legacy/api.php @@ -354,8 +354,9 @@ class OC_API { // basic auth - because OC_User::login will create a new session we shall only try to login // if user and pass are set $userSession = \OC::$server->getUserSession(); + $request = \OC::$server->getRequest(); try { - $loginSuccess = $userSession->tryTokenLogin(); + $loginSuccess = $userSession->tryTokenLogin($request); if (!$loginSuccess) { $loginSuccess = $userSession->tryBasicAuthLogin(); } -- cgit v1.2.3