diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-04-29 09:40:33 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-11 13:36:46 +0200 |
commit | 168ccf90a6ae515b1e4c2c10f32b08f284ac50b3 (patch) | |
tree | 15c296265922f3d22be37733e6330619271d6fcb /lib/private/User | |
parent | aa85edd2242c696954c64799e7880f7a3d39ca83 (diff) | |
download | nextcloud-server-168ccf90a6ae515b1e4c2c10f32b08f284ac50b3.tar.gz nextcloud-server-168ccf90a6ae515b1e4c2c10f32b08f284ac50b3.zip |
try apache auth too
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Session.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 972f59fc001..b72e4e1a1ed 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -332,7 +332,8 @@ class Session implements IUserSession, Emitter { * Tries to login the user with HTTP Basic Authentication * @return boolean if the login was successful */ - public function tryBasicAuthLogin() { + public function tryBasicAuthLogin(IRequest $request) { + // TODO: use $request->server instead of super globals if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { $result = $this->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); if ($result === true) { @@ -431,9 +432,7 @@ class Session implements IUserSession, Emitter { * * @todo check remember me cookie */ - public function tryTokenLogin() { - // TODO: resolve cyclic dependency and inject IRequest somehow - $request = \OC::$server->getRequest(); + public function tryTokenLogin(IRequest $request) { $authHeader = $request->getHeader('Authorization'); if (strpos($authHeader, 'token ') === false) { // No auth header, let's try session id |