Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
49 lines (43 sloc)
1.34 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Illuminate\Contracts\Auth; | |
interface UserProvider | |
{ | |
/** | |
* Retrieve a user by their unique identifier. | |
* | |
* @param mixed $identifier | |
* @return \Illuminate\Contracts\Auth\Authenticatable|null | |
*/ | |
public function retrieveById($identifier); | |
/** | |
* Retrieve a user by their unique identifier and "remember me" token. | |
* | |
* @param mixed $identifier | |
* @param string $token | |
* @return \Illuminate\Contracts\Auth\Authenticatable|null | |
*/ | |
public function retrieveByToken($identifier, $token); | |
/** | |
* Update the "remember me" token for the given user in storage. | |
* | |
* @param \Illuminate\Contracts\Auth\Authenticatable $user | |
* @param string $token | |
* @return void | |
*/ | |
public function updateRememberToken(Authenticatable $user, $token); | |
/** | |
* Retrieve a user by the given credentials. | |
* | |
* @param array $credentials | |
* @return \Illuminate\Contracts\Auth\Authenticatable|null | |
*/ | |
public function retrieveByCredentials(array $credentials); | |
/** | |
* Validate a user against the given credentials. | |
* | |
* @param \Illuminate\Contracts\Auth\Authenticatable $user | |
* @param array $credentials | |
* @return bool | |
*/ | |
public function validateCredentials(Authenticatable $user, array $credentials); | |
} |