Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Contracts\Auth; |
| 4 | |
| 5 | interface UserProvider |
| 6 | { |
| 7 | /** |
| 8 | * Retrieve a user by their unique identifier. |
| 9 | * |
| 10 | * @param mixed $identifier |
| 11 | * @return \Illuminate\Contracts\Auth\Authenticatable|null |
| 12 | */ |
| 13 | public function retrieveById($identifier); |
| 14 | |
| 15 | /** |
| 16 | * Retrieve a user by their unique identifier and "remember me" token. |
| 17 | * |
| 18 | * @param mixed $identifier |
| 19 | * @param string $token |
| 20 | * @return \Illuminate\Contracts\Auth\Authenticatable|null |
| 21 | */ |
| 22 | public function retrieveByToken($identifier, $token); |
| 23 | |
| 24 | /** |
| 25 | * Update the "remember me" token for the given user in storage. |
| 26 | * |
| 27 | * @param \Illuminate\Contracts\Auth\Authenticatable $user |
| 28 | * @param string $token |
| 29 | * @return void |
| 30 | */ |
| 31 | public function updateRememberToken(Authenticatable $user, $token); |
| 32 | |
| 33 | /** |
| 34 | * Retrieve a user by the given credentials. |
| 35 | * |
| 36 | * @param array $credentials |
| 37 | * @return \Illuminate\Contracts\Auth\Authenticatable|null |
| 38 | */ |
| 39 | public function retrieveByCredentials(array $credentials); |
| 40 | |
| 41 | /** |
| 42 | * Validate a user against the given credentials. |
| 43 | * |
| 44 | * @param \Illuminate\Contracts\Auth\Authenticatable $user |
| 45 | * @param array $credentials |
| 46 | * @return bool |
| 47 | */ |
| 48 | public function validateCredentials(Authenticatable $user, array $credentials); |
| 49 | } |