Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 6ee2bc9

Browse files
docs: update [skip ci].
1 parent acc459e commit 6ee2bc9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,16 @@ $creator = new \Nyholm\Psr7Server\ServerRequestCreator(
5353
);
5454

5555
$serverRequest = $creator->fromGlobals();
56-
$extractor = \Istio\JWTPayloadExtractor\ExtractorFactory::fromOriginTokenHeader('issuer.example', 'authorization');
56+
$extractor = \Istio\JWTPayloadExtractor\ExtractorFactory::fromOriginTokenHeader('issuer.example');
5757
$payload = $extractor->extract($serverRequest);
5858

5959
if(null !== $payload) {
6060
var_dump($payload);
6161
}
62+
63+
// by default it extract token from `authorization` header with `Bearer ` prefix, you can change it via next args:
64+
65+
$extractor = \Istio\JWTPayloadExtractor\ExtractorFactory::fromOriginTokenHeader('issuer.example', 'x-token', 'yourPrefix ');
6266
```
6367

6468
+ Extract origin token in query param:

0 commit comments

Comments
 (0)