Skip to content

Commit 62345ab

Browse files
committed
Add note to readme
1 parent ec013c9 commit 62345ab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ $token = array(
2727
"nbf" => 1357000000
2828
);
2929

30+
/*
31+
IMPORTANT
32+
HS256 is actually the default, but you should set it explicitly
33+
if you intend to use another strategy (e.g. RS256):
34+
*/
35+
JWT::setOnlyMethodAllowed('HS256');
36+
3037
$jwt = JWT::encode($token, $key);
3138
$decoded = JWT::decode($jwt, $key);
3239

0 commit comments

Comments
 (0)