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

Commit

Permalink
docs: update [skip ci].
Browse files Browse the repository at this point in the history
  • Loading branch information
vuongxuongminh committed Oct 30, 2021
1 parent acc459e commit 6ee2bc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ $creator = new \Nyholm\Psr7Server\ServerRequestCreator(
);

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

if(null !== $payload) {
var_dump($payload);
}

// by default it extract token from `authorization` header with `Bearer ` prefix, you can change it via next args:

$extractor = \Istio\JWTPayloadExtractor\ExtractorFactory::fromOriginTokenHeader('issuer.example', 'x-token', 'yourPrefix ');
```

+ Extract origin token in query param:
Expand Down

0 comments on commit 6ee2bc9

Please sign in to comment.