diff options
author | Joas Schilling <coding@schilljs.com> | 2023-08-28 15:50:45 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-08-28 15:50:45 +0200 |
commit | 25309bcb45232bf30fe719bac1776f0136f7cd7a (patch) | |
tree | 7cfa6dacd42f22a854b895c2ae5853ff1725d96b /lib/private/User | |
parent | ac3d7e3a7e9848c5e134b79f481d73416cc810f4 (diff) | |
download | nextcloud-server-25309bcb45232bf30fe719bac1776f0136f7cd7a.tar.gz nextcloud-server-25309bcb45232bf30fe719bac1776f0136f7cd7a.zip |
techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Session.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index e7075bce47a..82887f8d029 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -419,7 +419,7 @@ class Session implements IUserSession, Emitter { * @param string $user * @param string $password * @param IRequest $request - * @param OC\Security\Bruteforce\Throttler $throttler + * @param IThrottler $throttler * @throws LoginException * @throws PasswordLoginForbiddenException * @return boolean @@ -427,7 +427,7 @@ class Session implements IUserSession, Emitter { public function logClientIn($user, $password, IRequest $request, - OC\Security\Bruteforce\Throttler $throttler) { + IThrottler $throttler) { $remoteAddress = $request->getRemoteAddress(); $currentDelay = $throttler->sleepDelayOrThrowOnMax($remoteAddress, 'login'); @@ -572,11 +572,11 @@ class Session implements IUserSession, Emitter { * * @todo do not allow basic auth if the user is 2FA enforced * @param IRequest $request - * @param OC\Security\Bruteforce\Throttler $throttler + * @param IThrottler $throttler * @return boolean if the login was successful */ public function tryBasicAuthLogin(IRequest $request, - OC\Security\Bruteforce\Throttler $throttler) { + IThrottler $throttler) { if (!empty($request->server['PHP_AUTH_USER']) && !empty($request->server['PHP_AUTH_PW'])) { try { if ($this->logClientIn($request->server['PHP_AUTH_USER'], $request->server['PHP_AUTH_PW'], $request, $throttler)) { |