JsonWebTokenSecretProvider

Class JsonWebTokenSecretProvider

Creates random secret for JWT authentication.

package

Default

Methods

Returns a secret for JWT authentication

getSecret() : string
static

Secret is stored in gm_configuration with key REST_API_SECRET. If none is found a new secret will be created using random_bytes(), openssl_random_pseudo_bytes(), or mt_rand().

Response

string

Resets REST API secret.

resetSecret() 
static

ATTENTION: Calling this method will irrevocably invalidate each and every JWT token currently in use! (Unless a database backup with the old secret is available.)

Constants

SECRET_LENGTH

SECRET_LENGTH

SECRET_CONFIG_KEY

SECRET_CONFIG_KEY