Own Spring OAuth2 server together with 3rdparty OAuth providers

前端 未结 2 1487
野的像风
野的像风 2020-12-13 04:36

In a Spring Boot application, I have an OAuth2 Authorization/Resource servers. Based on this and Spring Security, I have secured my Spring MVC REST API endpoints.

In

2条回答
  •  有刺的猬
    2020-12-13 05:24

    This tutorial shows how to achieve exactly that (if I understood the problem correctly) : having an auth server issuing your own oauth2 tokens based on external oauth2 authentication. The corresponding code is available here.

    The gist of it is that you use @EnableOAuth2Client in addition to @EnableAuthorizationServer and insert an OAuth2ClientAuthenticationProcessingFilter filter before spring security default ones.

提交回复
热议问题