Method |
Description |
|
__call ( string $method, array $parameters ) : mixed |
Magically call the JWT instance. |
|
__construct ( Tymon\JWTAuth\JWT $jwt, Illuminate\Contracts\Auth\UserProvider $provider, Illuminate\Http\Request $request ) |
Create a new authentication guard. |
|
attempt ( array $credentials = [], boolean $login = true ) : mixed |
Attempt to authenticate the user using the given credentials and return the token. |
|
generateTokenById ( mixed $id ) : string | null |
Generate new token by ID. |
|
getLastAttempted ( ) : Illuminate\Contracts\Auth\Authenticatable |
Get the last user we attempted to authenticate. |
|
getPayload ( ) : Tymon\JWTAuth\Payload |
Get the raw Payload instance. |
|
getProvider ( ) : Illuminate\Contracts\Auth\UserProvider |
Get the user provider used by the guard. |
|
getToken ( ) : false | Token |
Get the token. |
|
getUser ( ) : Illuminate\Contracts\Auth\Authenticatable | null |
Return the currently cached user. |
|
invalidate ( boolean $forceForever = false ) : boolean |
Invalidate current token (add it to the blacklist). |
|
login ( Tymon\JWTAuth\Contracts\JWTSubject $user ) : string |
Create a token for a user. |
|
logout ( boolean $forceForever = true ) : boolean |
Logout the user. |
|
once ( array $credentials = [] ) : boolean |
Log a user into the application without sessions or cookies. |
|
onceUsingId ( mixed $id ) : boolean |
Log the given user ID into the application without sessions or cookies. |
|
refresh ( ) : string |
Refresh current expired token. |
|
setProvider ( Illuminate\Contracts\Auth\UserProvider $provider ) |
Set the user provider used by the guard. |
|
setRequest ( Illuminate\Http\Request $request ) |
Set the current request instance. |
|
setToken ( Token | string $token ) : JwtGuard |
Set the token. |
|
user ( ) : Illuminate\Contracts\Auth\Authenticatable | null |
Get the currently authenticated user. |
|
validate ( array $credentials = [] ) : boolean |
Validate a user's credentials. |
|