Skip to content

Add SupplierClientRegistrationRepository #12967

Closed
@jzheaux

Description

@jzheaux

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);
    });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: ideal-for-contributionAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions