简体   繁体   中英

Setup a Spring security based OAuth2 server

Want to develop a Spring security based OAuth2 server. My UI is completely decoupled from backend (Angular.js). There should be apis like 1) /security/oauth2/token to issue token 2) /security/oauth2/validate to validate token etc

These REST apis and Spring configuration should not contain any UI or MVC related information unlike normal Spring security.

Any idea how to do it?

There are a few articles around showing how to build your own OAuth2 system.

Unfortunately I am not using Java for stuff like this, but if you are interested you can go to my blog and check out the basics in this article : https://eidand.com/2015/03/28/authorization-system-with-owin-web-api-json-web-tokens/

It will explain how the whole thing works and how you communicate with such a system once it's built.

OAuth2 is a standard so you can always build your own Oauth2 client which can talk to any external OAuth2 provider as well as your own system, it's just a question of changing the application details ( ClientID and ClientSecret ) and token URL.

The API itself you can build with any stack you wish, REST or not and you will be able to use it with JAVA or whatever you fancy.

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