Closed
Description
SupplierJwtDecoder
allows for deferring the query to the authorization server for JWKS, allowing resource servers to restart more resiliently (since they don't require the authorization server to be up at that time).
It would be nice for OAuth 2.0 Cilent applications to have the same startup resiliency. With SupplierClientRegistrationRepository
, then applications could defer the construction like so:
@Bean
ClientRegistrationRepository clientRegistrations() {
return new SupplierClientRegistrationRepository(() -> {
ClientRegistration registration = ClientRegistrations.fromIssuerLocation("http://localhost:8080").build();
return new InMemoryClientRegistrationRepository(registration);
});
}