Summary

Can't find equivalent for https://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/token/DefaultTokenServices.java class using spring-boot-starter-oauth2-resource-server according to the following migration guide -> https://github.com/spring-projects/spring-security/wiki/OAuth-2.0-Migration-Guide

Sample

The code I had in my service before migration:

@Autowired
private DefaultTokenServices tokenServices;

// ...
Authentication authResult = tokenServices.loadAuthentication(token);
SecurityContextHolder.getContext().setAuthentication(authResult);
// ...

How can I achieve the same using spring-boot-starter-oauth2-resource-server? I can not find the way for now, would be nice to have an example.

Comment From: jzheaux

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.

Briefly, though, because the support was completely rewritten, there may not be a one-to-one class mapping, which means it will be helpful to know what you're application is trying to do. If you do ask this on StackOverflow, please add that detail to your question and then post a link to the question here.