Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix auth rhai example and link #3795

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/configuration/authn-jwt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ You enable JWT authentication for your router with the following steps:
router:
jwt:
jwks: # This key is required.
- url: https://dev-zzp5enui.us.auth0.com/.well-known/jwks.json
issuer: <optional name of issuer>
- url: https://dev-zzp5enui.us.auth0.com/.well-known/jwks.json
issuer: <optional name of issuer>

# These keys are optional. Default values are shown.
header_name: Authorization
Expand Down Expand Up @@ -204,7 +204,7 @@ fn process_request(request) {
status: 401
};
}
request.subgraph.extensions["claims"] = claims;
request.subgraph.body.extensions["claims"] = claims;
}
```

Expand Down Expand Up @@ -650,7 +650,7 @@ This matching strategy is necessary because some identity providers (IdPs) don't

## Forwarding JWTs to subgraphs

Because the Apollo Router handles validating incoming JWTs, you rarely need to pass those JWTs to individual subgraphs in their entirety. Instead, you usually want to [pass JWT _claims_ to subgraphs](#example-forwarding-claims-to-subgraphs) to enable fine-grained access control.
Because the Apollo Router handles validating incoming JWTs, you rarely need to pass those JWTs to individual subgraphs in their entirety. Instead, you usually want to [pass JWT _claims_ to subgraphs](#example-forwarding-claims-to-subgraphs-as-headers) to enable fine-grained access control.

If you _do_ need to pass entire JWTs to subgraphs, you can do so via the Apollo Router's general-purpose [HTTP header propagation settings](./header-propagation).

Expand Down