46得票4回答
应用程序域名必须与Facebook网络游戏URL(https),移动站点URL,Unity二进制文件URL,站点URL或安全页面选项卡URL匹配。

我正在开发一个使用Spring Boot + Facebook集成的示例。在这个示例中,我创建了一个在https://developers.facebook.com/上的应用程序。下面是创建的应用程序的截图。 当我传递域名时,出现以下错误:App domains must match the...

36得票1回答
WebSecurityConfigurerAdapter和ResourceServerConfigurerAdapter之间的关系

我正在尝试将Spring OAuth2集成到Spring MVC REST中。 在Spring OAuth2的大多数示例中,只有ResourceServerConfigurerAdapter,而有些示例还包括WebSecurityConfigurerAdapter。 我不打算将OAuth与Go...

30得票3回答
官方的Spring安全oauth2示例由于cookie冲突(授权码机制)而无法正常工作。

根据教程 Spring Boot and OAuth2,我的项目结构如下: 以下是源代码: SocialApplication.class: @SpringBootApplication @RestController @EnableOAuth2Client @EnableAuth...

27得票1回答
如何使用AuthorizationServerSecurityConfigurer?

我正在查看一个Spring Boot项目,其中包含以下代码:public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { oauthServer ....

27得票6回答
如何从OAuth2授权服务器的/user端点获取自定义用户信息

我已经使用@EnableResourceServer注释配置了一个资源服务器,并通过以下方式使用user-info-uri参数引用授权服务器: security: oauth2: resource: user-info-uri: http://localhost:90...

24得票2回答
替换AuthorizationRequest后,HttpSession为空。

问题 在自定义实现DefaultOAuth2RequestFactory替换当前AuthorizationRequest为保存的AuthorizationRequest后,HttpSession变为null。这导致后续请求/oauth/token失败,因为Spring Security过滤器...

21得票3回答
Java 17无法调用“java.lang.reflect.Method.invoke(Object, Object[])”,因为com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass为空。

我在使用Spring Boot和OAuth2的小项目中想要运行资源服务器。 环境设置: Java 17 spring-boot-starter-parent版本为2.5.6 spring-cloud-dependencies版本为2020.0.4 spring-boot-starter-oa...

20得票5回答
如何在Spring中注销oauth2客户端?

我有最简单的oauth2客户端:@EnableAutoConfiguration @Configuration @EnableOAuth2Sso @RestController public class ClientApplication { @RequestMapping("/")...

16得票4回答
将自定义的UserDetailsService添加到Spring Security OAuth2应用程序

我该如何将自定义的 UserDetailsService 添加到 这个 Spring OAuth2 示例中?默认的 user 和 password 已经在 authserver 应用程序的 application.properties 文件中定义。但是,出于测试目的,我想将以下自定义的 Use...

16得票2回答
如何使用Spring Cloud Security实现OAuth2的“令牌交换”

我想知道是否有人有一个示例,展示如何使用Spring Cloud Security(带有OAuth2)实现“令牌交换”技术。 目前,我已经在微服务环境中使用ZuulProxy实现了“令牌中继”技术,以“中继”OAuth2令牌并实现SSO。这很好,但意味着每个微服务都使用相同的clientId(...