summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorScott Arciszewski <scott@arciszewski.me>2015-04-01 02:47:28 -0400
committerScott Arciszewski <scott@arciszewski.me>2015-04-01 02:47:28 -0400
commit62345abe5eb33e167841485c596f3e7337812127 (patch)
tree0c181da6368b6288714db634116c16aa0c4ddf88 /README.md
parentec013c9b275afc1fa1bedcec54b22fa9fc3546bb (diff)
downloadphp-jwt-62345abe5eb33e167841485c596f3e7337812127.zip
php-jwt-62345abe5eb33e167841485c596f3e7337812127.tar.gz
php-jwt-62345abe5eb33e167841485c596f3e7337812127.tar.bz2
Add note to readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4888462..03ec673 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,13 @@ $token = array(
"nbf" => 1357000000
);
+/*
+ IMPORTANT
+ HS256 is actually the default, but you should set it explicitly
+ if you intend to use another strategy (e.g. RS256):
+*/
+JWT::setOnlyMethodAllowed('HS256');
+
$jwt = JWT::encode($token, $key);
$decoded = JWT::decode($jwt, $key);