1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Allow Jwt assertion to be resolved

Closes gh-9812
This commit is contained in:
Joe Grandja
2022-01-07 13:23:02 -05:00
parent 6c5fd38a3f
commit 525f40490c
6 changed files with 131 additions and 15 deletions
@@ -1098,3 +1098,9 @@ class OAuth2ResourceServerController {
}
----
====
[NOTE]
`JwtBearerReactiveOAuth2AuthorizedClientProvider` resolves the `Jwt` assertion via `OAuth2AuthorizationContext.getPrincipal().getPrincipal()` by default, hence the use of `JwtAuthenticationToken` in the preceding example.
[TIP]
If you need to resolve the `Jwt` assertion from a different source, you can provide `JwtBearerReactiveOAuth2AuthorizedClientProvider.setJwtAssertionResolver()` with a custom `Function<OAuth2AuthorizationContext, Mono<Jwt>>`.
@@ -1352,3 +1352,9 @@ class OAuth2ResourceServerController {
}
----
====
[NOTE]
`JwtBearerOAuth2AuthorizedClientProvider` resolves the `Jwt` assertion via `OAuth2AuthorizationContext.getPrincipal().getPrincipal()` by default, hence the use of `JwtAuthenticationToken` in the preceding example.
[TIP]
If you need to resolve the `Jwt` assertion from a different source, you can provide `JwtBearerOAuth2AuthorizedClientProvider.setJwtAssertionResolver()` with a custom `Function<OAuth2AuthorizationContext, Jwt>`.