TokenGuard
class TokenGuard implements Guard (View source)
Traits
These methods are typically the same across all guards.
Properties
protected Authenticatable|null | $user | The currently authenticated user. |
from GuardHelpers |
protected UserProvider | $provider | The user provider implementation. |
from GuardHelpers |
static protected array | $macros | The registered string macros. |
from Macroable |
protected Request | $request | The request instance. |
|
protected string | $inputKey | The name of the query string item from the request containing the API token. |
|
protected string | $storageKey | The name of the token "column" in persistent storage. |
|
protected bool | $hash | Indicates if the API token is hashed in storage. |
Methods
Determine if the current user is authenticated. If not, throw an exception.
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Create a new authentication guard.
Get the currently authenticated user.
Get the token for the current request.
Validate a user's credentials.
Details
Authenticatable
authenticate()
Determine if the current user is authenticated. If not, throw an exception.
__construct(UserProvider $provider, Request $request, string $inputKey = 'api_token', string $storageKey = 'api_token', bool $hash = false)
Create a new authentication guard.