JWT Authentication Adapter.
This class provides a JWT authentication adapter for the Hazaar MVC framework.
public string $passphrase
public string $privateKey
private bool $writeCookie
private bool $clearCookie
public __construct({Array})
Parameter | Type | Description |
---|
$config | Map | |
Authorises the JWT token.
Parameter | Type | Description |
---|
$data | array | |
Parameter | Type | Description |
---|
$key | string | |
Parameter | Type | Description |
---|
$key | string | |
Parameter | Type | Description |
---|
$key | string | |
$value | mixed | |
Parameter | Type | Description |
---|
$key | string | |
public writeToken({Array})
Refreshes the JWT token.
Parameter | Type | Description |
---|
$refreshToken | string | |
$JWTRefreshBody | array | |
Validates the JWT token.
private validateToken({Array})
Parameter | Type | Description |
---|
$token | string | the JWT token |
$JWTBody | array | |
$passphrase | string | the passphrase |
private checkToken({Array})
Builds a JWT token with the given JWT body and passphrase.
private buildToken({Array})
Parameter | Type | Description |
---|
$JWTBody | array | the body of the JWT token |
$passphrase | string | The passphrase to sign the JWT token. Defaults to null. |
private buildRefreshTokenKey({Array})
Parameter | Type | Description |
---|
$passphrase | string | |
Signs the JWT token.
Parameter | Type | Description |
---|
$JWTHeader | array | the header of the JWT token |
$JWTBody | array | the body of the JWT token |
$passphrase | string | |
Generated by Hazaar API Doc Generator