0

I have been reading that link.

It describes how to implement interacting with a resource server through OAuth2 by adding some configuration to application.yml.

application.yml
security:
  oauth2:
    client:
      clientId: 233668646673605
      clientSecret: 33b17e044ee6a4fa383f46ec6e28ea1d
      accessTokenUri: https://graph.facebook.com/oauth/access_token
      userAuthorizationUri: https://www.facebook.com/dialog/oauth
      tokenName: oauth_token
      authenticationScheme: query
      clientAuthenticationScheme: form
    resource:
      userInfoUri: https://graph.facebook.com/me
...

In that example, the client application interacts with Facebook resource server, and it is subordinated to that resource server.

If I want to have more than one resource server, I can't edit the yml, because the original configuration for facebook is present there.

In this case, how do I handle second resource server ?

1 Answers1

0

You can have more than one resource server by inserting client(Facebook, Google) details in the table "oauth_client_details". Please refer this link for clear idea

http://www.baeldung.com/spring-security-oauth-dynamic-client-registration Or You can specify multiple clients like this

Adding more then one client to the Spring OAuth2 Auth Server

Gnana
  • 144
  • 7