diff --git a/jwt.php b/jwt.php index eaa3136..3c4a429 100644 --- a/jwt.php +++ b/jwt.php @@ -25,6 +25,7 @@ class jwt * @param string $key The key to be used to sign the token * @param string|null $alg The algorithm to use to sign the token (default * is HS256) + * Allowed algorithms : HS256, HS512, HS384 * @return string The Token */ public function encode ($payload, $key, $alg = "HS256") @@ -54,6 +55,7 @@ class jwt * provided password */ public function decode ($jwt, $key, $allowedAlg = null) + // {{{ { if ($allowedAlg === null) $allowedAlg = array_keys ($this->supportedAlgs); @@ -95,6 +97,7 @@ class jwt "JWT Signature verification failed"), 403); return $payload; } + // }}} /** Verify the provided token with the key and generate an return true if it * can be verify