123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <?php
- declare(strict_types=1);
- namespace OC\Authentication\Token;
- use OC\Authentication\Exceptions\ExpiredTokenException;
- use OC\Authentication\Exceptions\InvalidTokenException;
- use OC\Authentication\Exceptions\PasswordlessTokenException;
- use OC\Authentication\Exceptions\WipeTokenException;
- interface IProvider {
-
- public function generateToken(string $token,
- string $uid,
- string $loginName,
- ?string $password,
- string $name,
- int $type = IToken::TEMPORARY_TOKEN,
- int $remember = IToken::DO_NOT_REMEMBER): IToken;
-
- public function getToken(string $tokenId): IToken;
-
- public function getTokenById(int $tokenId): IToken;
-
- public function renewSessionToken(string $oldSessionId, string $sessionId): IToken;
-
- public function invalidateToken(string $token);
-
- public function invalidateTokenById(string $uid, int $id);
-
- public function invalidateOldTokens();
-
- public function invalidateLastUsedBefore(string $uid, int $before): void;
-
- public function updateToken(IToken $token);
-
- public function updateTokenActivity(IToken $token);
-
- public function getTokenByUser(string $uid): array;
-
- public function getPassword(IToken $savedToken, string $tokenId): string;
-
- public function setPassword(IToken $token, string $tokenId, string $password);
-
- public function rotate(IToken $token, string $oldTokenId, string $newTokenId): IToken;
-
- public function markPasswordInvalid(IToken $token, string $tokenId);
-
- public function updatePasswords(string $uid, string $password);
- }
|