class
Illuminate
/
Auth
/
TokenGuard
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
TokenGuard
Implements
Uses
Properties
protected
$inputKey string
The name of the query string item from the request containing the API token.
Default: null
protected
$storageKey string
The name of the token "column" in persistent storage.
Default: null
protected
$hash bool
Indicates if the API token is hashed in storage.
Default: false
Methods
public
__construct ( UserProvider $provider , Request $request , $inputKey , $storageKey , $hash ) : void
Create a new authentication guard.
Parameters
- $provider UserProvider
- $request Request
- $inputKey string
- $storageKey string
- $hash bool
public
getTokenForRequest ( ) : string
Get the token for the current request.
public
validate ( array $credentials ) : bool
Validate a user's credentials.
Parameters
- $credentials array