GenTux\Jwt\JwtToken::secret PHP Method

secret() public method

Get the secret to use for token operations
public secret ( ) : string
return string
    public function secret()
    {
        $secret = $this->secret ?: getenv('JWT_SECRET');
        if (!$secret) {
            throw new NoSecretException('Unable to find secret. Set using env variable JWT_SECRET');
        }
        return $secret;
    }