PHP Трейт GenTux\Jwt\GetsJwtToken

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

getToken() публичный Метод

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
Результат string | null

jwtPayload() публичный Метод

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
Результат array

jwtToken() публичный Метод

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
Результат JwtToken