Spring OAuth Server: Authenticate User With UserDetails Service

In this article, we will see how we can customize the authentication where user details are fetched from another component/service over HTTP. Store user details as Principal and use them later while creating tokens to customize the claims in JWT (the scope of this article covers two flows only: client-credentials and code flow).

The code is available on GitHub.

This article has been indexed from DZone Security Zone

Read the original article: