Skip to content

Provide RestClientSpringOpaqueTokenIntrospector#18746

Open
therepanic wants to merge 1 commit intospring-projects:mainfrom
therepanic:gh-18745
Open

Provide RestClientSpringOpaqueTokenIntrospector#18746
therepanic wants to merge 1 commit intospring-projects:mainfrom
therepanic:gh-18745

Conversation

@therepanic
Copy link
Contributor

@therepanic therepanic commented Feb 16, 2026

Since similar classes have alternative versions using RestClient instead of RestTemplate, I think we should do the same with this class.

Closes: gh-18745

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 16, 2026
Since similar classes have alternative versions using RestClient instead
of RestTemplate, I think we should do the same with this class.

Closes: spring-projectsgh-18745

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @therepanic ! To encourage its use, are you able to add documentation to opaque-token.adoc explaining how to use it?

* @author Andrey Litvitski
* @since 7.1
*/
public class RestClientSpringOpaqueTokenIntrospector implements OpaqueTokenIntrospector {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do RestClientOpaqueTokenIntrospector for brevity

* principal.
* </p>
* @param authenticationConverter the converter
* @since 7.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since all of this is introduced in 7.1, please leave @since 7.1 off of methods, leaving them on the classes.

this.clientSecret = URLEncoder.encode(clientSecret, StandardCharsets.UTF_8);
return this;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a postProcessr(Consumer<RestClientSpringOpaqueTokenIntrospector> postProcessor) method that keeps track of a set of post processors and then build() calls each in turn after constructing the introspector.

Please see #18625

@jzheaux jzheaux self-assigned this Feb 25, 2026
@jzheaux jzheaux added type: enhancement A general enhancement in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a RestClientSpringOpaqueTokenIntrospector

3 participants