Configuring resource server with RemoteTokenServices in Spring Security Oauth2

后端 未结 4 2071
臣服心动
臣服心动 2021-01-03 06:58

I\'m trying to implement a authorization server and a resource server using spring security oauth2. So far i\'ve managed to setup the authorization server and since i dont w

4条回答
  •  滥情空心
    2021-01-03 07:45

    You may be able to get this working simply through property config. Try putting this in your application.yml, along with your HttpSecurity config for the /cards/ URI.

    security:
      oauth2:
        resource:
          token-info-uri: https://[your token validation endpoint]
          preferTokenInfo: true
    

    Having @EnableWebSecurity and @EnableResourceServer is duplicative. You do not need @EnableWebSecurity.

提交回复
热议问题