summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-04-29 14:00:07 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-05-11 13:36:46 +0200
commit699289cd26d3101c18b72e287de77282c782c9cc (patch)
treef605634fb2c5df329e815e5212f0723c76dbb04e /lib
parent168ccf90a6ae515b1e4c2c10f32b08f284ac50b3 (diff)
downloadnextcloud-server-699289cd26d3101c18b72e287de77282c782c9cc.tar.gz
nextcloud-server-699289cd26d3101c18b72e287de77282c782c9cc.zip
pass in $request on OCS api
Diffstat (limited to 'lib')
-rw-r--r--lib/private/User/Session.php2
-rw-r--r--lib/private/legacy/api.php3
2 files changed, 4 insertions, 1 deletions
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();
}