我如何开发仅公开Rest API并通过Google或GitHub访问令牌授权请求的Spring Boot应用程序?

问题描述 投票:0回答:2

我已经开发了一个Spring-boot Web应用程序,该应用程序只公开了宁静的API,以及那些将由angular应用程序或android应用程序使用的端点。

现在,我需要根据用户偏好通过Google,Facebook或GitHub OAuth2访问令牌授权那些Restful API请求,我不确定如何执行此操作。

angular spring-boot oauth-2.0 google-oauth2 restful-authentication
2个回答
0
投票

您可以使用Spring Security来实现。您可以在网上找到很多文章。例如,勾选this


0
投票

查看官方Spring Boot指南Spring Boot and OAuth2(所描述的应用程序以简单的单提供商单点登录开始,并且可以通过选择的身份验证提供程序运行到客户端:GitHubGoogle)。

© www.soinside.com 2019 - 2024. All rights reserved.