-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: inject claims as headers (#27)
- Loading branch information
1 parent
a590b52
commit ebe1ac5
Showing
3 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,16 @@ tid=11111111-1111-1111-1111-111111111111 | |
Along with validating the JWT token, the token must have a claim tid=11111111-1111-1111-1111-111111111111 and one of aud=22222222-2222-2222-2222-222222222222 | ||
or aud=33333333-3333-3333-3333-333333333333 | ||
### Inject claims as headers | ||
The /auth endpoint supports a custom parameter called "inject-claims". The values are comma separated names of claims which will be added to the response headers. These headers can be used with the Ingres Nginx auth_request_set and add_header features. | ||
For example, using the following query string /auth? | ||
tid=11111111-1111-1111-1111-111111111111 | ||
&aud=22222222-2222-2222-2222-222222222222 | ||
&inject-claims=email | ||
The /auth response will contains headers [email protected] | ||
## Design | ||
![alt text](/docs/validate-jwt.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters