TokenGuard (Auth)
TokenGuard
class TokenGuard implements Guard (View source)
Traits
GuardHelpers | These methods are typically the same across all guards. |
Methods
bool | check() Determine if the current user is authenticated. | from GuardHelpers |
bool | guest() Determine if the current user is a guest. | from GuardHelpers |
int|null | id() Get the ID for the currently authenticated user. | from GuardHelpers |
void | setUser( Authenticatable $user) Set the current user. | from GuardHelpers |
void | __construct( UserProvider $provider, Request $request) Create a new authentication guard. | |
Authenticatable|null | user() Get the currently authenticated user. | |
bool | validate( array $credentials = array()) Validate a user's credentials. | |
$this | setRequest( Request $request) Set the current request instance. |
Details
bool check()
Determine if the current user is authenticated.
bool guest()
Determine if the current user is a guest.
int|null id()
Get the ID for the currently authenticated user.
void setUser( Authenticatable $user)
Set the current user.
void __construct( UserProvider $provider, Request $request)
Create a new authentication guard.
Authenticatable|null user()
Get the currently authenticated user.
bool validate( array $credentials = array())
Validate a user's credentials.
$this setRequest( Request $request)
Set the current request instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Auth/TokenGuard.html