jwtbutler 1.7.7 → 1.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -212,6 +212,7 @@ if (@$_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
try {
|
|
215
|
+
// access token is delivered via authorization header or cookie
|
|
215
216
|
$token = null;
|
|
216
217
|
if ($_SERVER['HTTP_AUTHORIZATION'] ?? '') {
|
|
217
218
|
$token = str_replace('Bearer ', '', $_SERVER['HTTP_AUTHORIZATION']);
|
|
@@ -219,7 +220,7 @@ try {
|
|
|
219
220
|
$token = str_replace('Bearer ', '', $_COOKIE['access_token']);
|
|
220
221
|
}
|
|
221
222
|
$user_id = JWT::decode(
|
|
222
|
-
$token,
|
|
223
|
+
$token,
|
|
223
224
|
new Key('WM38tprPABEgkldbt2yTAgxf2CGstfr5', 'HS256'), // secret key
|
|
224
225
|
)->sub;
|
|
225
226
|
http_response_code(200);
|