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 1ab0705b47
commit 214cfe807e
6 changed files with 131 additions and 15 deletions
@@ -1092,3 +1092,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>>`.
@@ -1270,3 +1270,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>`.