简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM