Class JsonWebTokenSecretProvider
Creates random secret for JWT authentication.
package |
Default |
---|
getSecret() : string
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().
string
resetSecret()
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.)
SECRET_LENGTH
SECRET_CONFIG_KEY