spring-projects / spring-authorization-server

Spring Authorization Server
https://spring.io/projects/spring-authorization-server
Apache License 2.0
4.84k stars 1.27k forks source link

Update findByToken in JpaOAuth2AuthorizationService to handle exceptions #1609

Closed patternknife closed 4 months ago

patternknife commented 5 months ago

Compared to findById, which uses a primary key, findByToken has the potential to cause errors, such as returning duplicate results. Although this likelihood is low, considering many concurrent situations, it's better to handle unexpected exceptions to prevent login failures.