@@ -214,6 +214,9 @@ discard block |
||
214 | 214 | $this->checkTokenValidity($this->activeUser, $token, $sessionId); |
215 | 215 | } |
216 | 216 | |
217 | + /** |
|
218 | + * @param string $password |
|
219 | + */ |
|
217 | 220 | protected function checkTokenValidity(IUser $user, IToken $token, $password) { |
218 | 221 | // Check whether login credentials are still valid and the user was not disabled |
219 | 222 | // This check is performed each 5 minutes |
@@ -299,7 +302,7 @@ discard block |
||
299 | 302 | * |
300 | 303 | * @param string $uid |
301 | 304 | * @param string $password |
302 | - * @return boolean|null |
|
305 | + * @return boolean |
|
303 | 306 | * @throws LoginException |
304 | 307 | */ |
305 | 308 | public function login($uid, $password) { |
@@ -385,6 +388,9 @@ discard block |
||
385 | 388 | return $this->config->getSystemValue('token_auth_enforced', false); |
386 | 389 | } |
387 | 390 | |
391 | + /** |
|
392 | + * @param string $username |
|
393 | + */ |
|
388 | 394 | protected function isTwoFactorEnforced($username) { |
389 | 395 | Util::emitHook( |
390 | 396 | '\OCA\Files_Sharing\API\Server2Server', |
@@ -402,7 +408,7 @@ discard block |
||
402 | 408 | /** |
403 | 409 | * Check if the given 'password' is actually a device token |
404 | 410 | * |
405 | - * @param type $password |
|
411 | + * @param string $password |
|
406 | 412 | * @return boolean |
407 | 413 | */ |
408 | 414 | public function isTokenPassword($password) { |
@@ -452,6 +458,9 @@ discard block |
||
452 | 458 | return false; |
453 | 459 | } |
454 | 460 | |
461 | + /** |
|
462 | + * @param string $uid |
|
463 | + */ |
|
455 | 464 | private function loginWithToken($uid) { |
456 | 465 | // TODO: $this->manager->emit('\OC\User', 'preTokenLogin', array($uid)); |
457 | 466 | $user = $this->manager->get($uid); |