PHP Trait GenTux\Jwt\GetsJwtToken

Afficher le fichier Open project: generationtux/jwt-artisan

Méthodes publiques

Méthode Description
getToken ( Illuminate\Http\Request | null $request = null ) : string | null Get the JWT token from the request
jwtPayload ( string | null $path = null, Illuminate\Http\Request | null $request = null ) : array Get payload from JWT token
jwtToken ( Illuminate\Http\Request | null $request = null ) : JwtToken Create a new JWT token object from the token in the request

Private Methods

Méthode Description
getAuthHeaderKey ( ) : string Get the header key to search for the token
getInputName ( ) : string Get the input name to search for the token in the request
makeDriver ( ) : GenTux\Jwt\Drivers\JwtDriverInterface Create a driver to use for the token from the IoC
makeRequest ( ) : Illuminate\Http\Request Resolve the current request from the IoC

Method Details

getToken() public méthode

We'll check the Authorization header first, and if that's not set then check the input to see if its provided there instead.
public getToken ( Illuminate\Http\Request | null $request = null ) : string | null
$request Illuminate\Http\Request | null
Résultat string | null

jwtPayload() public méthode

Get payload from JWT token
public jwtPayload ( string | null $path = null, Illuminate\Http\Request | null $request = null ) : array
$path string | null to query payload
$request Illuminate\Http\Request | null
Résultat array

jwtToken() public méthode

Create a new JWT token object from the token in the request
public jwtToken ( Illuminate\Http\Request | null $request = null ) : JwtToken
$request Illuminate\Http\Request | null
Résultat JwtToken