pass in $request on OCS api
This commit is contained in:
parent
168ccf90a6
commit
699289cd26
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue