We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffed276 commit d137805Copy full SHA for d137805
README.md
@@ -27,15 +27,14 @@ $token = array(
27
"nbf" => 1357000000
28
);
29
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
-
+/**
+ * IMPORTANT:
+ * You must specify supported algorithms for your application. See
+ * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
+ * for a list of spec-compliant algorithms.
+ */
37
$jwt = JWT::encode($token, $key);
38
-$decoded = JWT::decode($jwt, $key);
+$decoded = JWT::decode($jwt, $key, array('HS256'));
39
40
print_r($decoded);
41
0 commit comments