spring-attic / spring-security-oauth

Support for adding OAuth1(a) and OAuth2 features (consumer and provider) for Spring web applications.
http://github.com/spring-projects/spring-security-oauth
Apache License 2.0
4.7k stars 4.04k forks source link

How to separate Authorization Server and Resource Server #872

Open xzh0114 opened 8 years ago

xzh0114 commented 8 years ago

How to separate Authorization Server and Resource Server in different applications? And how to configure and make connection between two servers? Thanks a lot!

naveenb92 commented 8 years ago

http://www.baeldung.com/spring-security-oauth-jwt

https://github.com/spring-projects/spring-security-oauth/tree/master/samples/oauth2 Sparklr - Authorization Server | Tonr- Resource Server

Does that help ?

xzh0114 commented 8 years ago

I've searched a lot but in vain and thank you very much. I will have a try.

hughdev commented 6 years ago

@xzh0114 same issue, can you help me? please

xzh0114 commented 6 years ago

@yaleidev You may follow the demo above provided by naveenb92, and it tells in details. The basic idea is using JWT to carry all the authorization information, and when apply for resource, you should pass the JWT to the resource server. And for the resource server , it will decrypt the JWT and get the authorization then provide the service accordingly.

hughdev commented 6 years ago

thanks. the resource server How do you identify who the user is?such as userid ?

xzh0114 commented 6 years ago

@yaleidev all the information are encrypted in the JWT which you requested from the authorization server

hughdev commented 6 years ago

@xzh0114 i was used nodejs, does oauth2.0 + jwt? both servers exchange Information?

sandeepsharmaster commented 4 years ago

https://medium.com/@archnaaju/oauth2-and-spring-boot-2-a-complete-guide-to-setup-a-separate-authorization-server-resource-4d760cc0b1e1 I found this article from Archana onto similar concept. Enjoy reading!