'How to implement Oauth2 in spring boot?

I'm learning Ouath2 implementation in spring boot below way.

I want user to authorize himself first and then get a token, once get a token I want user to send that token with its REST API request to get resources.

Then resource server will verify the token and once valid will release the resource back to user request.

I know there are many examples and studies are available, but what I have observed that, most of the example are using GOOGLE, FACEBOOK etc to authenticate their user, that's not gonna help to understand my learning to develop everything manually for better understanding.

My ask is, Is anyone can share any example or references where I have control over (user authentication process + release token) and once user has token, then on resource server (validate the token with authorization server + full fill user request) I could implement token validation and return result ?

I'm want to do this authentication mechanism by myself for b. Is there any open source example is available just for learning purpose ?

All suggestions are welcome



Solution 1:[1]

The name of the thing your are looking for is Keycloak or Okta (these two are most popular). There are a lot of tutorials of course.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vladimir.V.Bvn