class Jwt

JSON Web Token Authentication

Methods

__construct($expireTime = null, string $key)

Constructor

void
set(string $key, mixed $value)

Set token parameter

string
createToken()

Create JWT token

mixed
decodeToken(string $token, bool $verify = true)

Decode encrypted JWT token

bool
verify()

Verify token data

mixed
validate(mixed $data)

Validate token data

Details

at line 40
__construct($expireTime = null, string $key)

Constructor

Parameters

$expireTime
string $key

at line 73
void set(string $key, mixed $value)

Set token parameter

Parameters

string $key
mixed $value

Return Value

void

at line 83
string createToken()

Create JWT token

Return Value

string

at line 98
mixed decodeToken(string $token, bool $verify = true)

Decode encrypted JWT token

Parameters

string $token
bool $verify

Return Value

mixed

at line 120
bool verify()

Verify token data

Return Value

bool

at line 133
mixed validate(mixed $data)

Validate token data

Parameters

mixed $data

Return Value

mixed