Skip to content

Introduce customizer for SpringOpaqueTokenIntrospector #47138

@quaff

Description

@quaff

I want to customize authenticationConverter of SpringOpaqueTokenIntrospector, currently I need to redefine my own bean to back off Spring Boot's auto-configured one, it would be nice if I can customize the auto-configured one.

I'd like to contribute if the proposal is accepted.

SpringOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) {
OAuth2ResourceServerProperties.Opaquetoken opaquetoken = properties.getOpaquetoken();
String introspectionUri = opaquetoken.getIntrospectionUri();
Assert.state(introspectionUri != null, "'introspectionUri' must not be null");
String clientId = opaquetoken.getClientId();
Assert.state(clientId != null, "'clientId' must not be null");
String clientSecret = opaquetoken.getClientSecret();
Assert.state(clientSecret != null, "'clientSecret' must not be null");
return SpringOpaqueTokenIntrospector.withIntrospectionUri(introspectionUri)
.clientId(clientId)
.clientSecret(clientSecret)
.build();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions