pass in $request on OCS api

This commit is contained in:
Christoph Wurst 2016-04-29 14:00:07 +02:00 committed by Thomas Müller
parent 168ccf90a6
commit 699289cd26
No known key found for this signature in database
GPG Key ID: A943788A3BBEC44C
2 changed files with 4 additions and 1 deletions

View File

@ -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) {

View File

@ -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();
}