无法验证从授权服务收到的数据 – 无法验证状态。

huangapple go评论66阅读模式
英文:

Failed to validate data received from Authorization service - could not validate state

问题

我下载了 ms-identity-java-webapp 存档,并在 application.properties 文件中更新了 Azure AD 的详细信息。
当我启动 Spring Boot 应用程序时,我得到一个登录页面。点击登录按钮后,我得到一个 Microsoft 登录页面,使用用户账户登录后,我得到了以下带有错误页面的日志行:


2020-09-23 16:53:06.982 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication :使用 PID 708 启动 MsalWebSampleApplication(C:\Users\testuser\Downloads\ms-identity-java-webapp-master\msal-java-webapp-sample\target\classes 位于 C:\Users\testuser\Downloads\ms-identity-java-webapp-master\msal-java-webapp-sample)
2020-09-23 16:53:06.985 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication :未设置活动配置文件,回退到默认配置文件:default
2020-09-23 16:53:08.466 INFO 708 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer :使用端口启动 Tomcat:8080(http)
2020-09-23 16:53:08.497 INFO 708 --- [ main] o.apache.catalina.core.StandardService :启动服务 [Tomcat]
2020-09-23 16:53:08.497 INFO 708 --- [ main] org.apache.catalina.core.StandardEngine :启动 Servlet 引擎:[Apache Tomcat/9.0.17]
2020-09-23 16:53:08.646 INFO 708 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] :正在初始化 Spring 嵌入式 WebApplicationContext
2020-09-23 16:53:08.647 INFO 708 --- [ main] o.s.web.context.ContextLoader :根 WebApplicationContext:初始化完成,耗时 1613 毫秒
2020-09-23 16:53:08.967 INFO 708 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :

使用生成的安全密码:970ff480-0c7d-4cd0-b657-000c23a68ab4

2020-09-23 16:53:09.148 INFO 708 --- [ main] o.s.s.web.DefaultSecurityFilterChain :创建过滤器链:任何请求,[org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6813a331,org.springframework.security.web.context.SecurityContextPersistenceFilter@27494e46,org.springframework.security.web.header.HeaderWriterFilter@68105edc,org.springframework.security.web.csrf.CsrfFilter@6e4ea0bd,org.springframework.security.web.authentication.logout.LogoutFilter@3e598df9,org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1e411d81,org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@75504cef,org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1bd81830,org.springframework.security.web.session.SessionManagementFilter@470a9030,org.springframework.security.web.access.ExceptionTranslationFilter@28782602]
2020-09-23 16:53:09.373 INFO 708 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor :正在初始化 ExecutorService 'applicationTaskExecutor'
2020-09-23 16:53:09.561 INFO 708 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping :添加欢迎页模板:index
2020-09-23 16:53:09.710 INFO 708 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer :Tomcat 已启动,端口:8080(http),上下文路径:''
2020-09-23 16:53:09.715 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication :MsalWebSampleApplication 已启动,耗时 3.211 秒(JVM 运行时间 4.717 秒)
2020-09-23 16:53:29.556 INFO 708 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] :正在初始化 Spring DispatcherServlet 'dispatcherServlet'
2020-09-23 16:53:29.556 INFO 708 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet :初始化 Servlet 'dispatcherServlet'
2020-09-23 16:53:29.562 INFO 708 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet :初始化完成,耗时 6 毫秒

无法验证从授权服务收到的数据 - 无法验证状态

有人遇到过这个问题吗?我该如何解决这个问题?

英文:

I downloaded ms-identity-java-webapp archive and updated the application.properties file with the Azure AD details.
When I started the Spring Boot application, I got a login page. After clicking login button, I got a microsoft login page and after logging in with the user account, I got the following log lines with an error page:


2020-09-23 16:53:06.982 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication : Starting MsalWebSampleApplication with PID 708 (C:\Users\testuser\Downloads\ms-identity-java-webapp-master\msal-java-webapp-sample\target\classes started by testuser in C:\Users\testuser\Downloads\ms-identity-java-webapp-master\msal-java-webapp-sample)
2020-09-23 16:53:06.985 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication : No active profile set, falling back to default profiles: default
2020-09-23 16:53:08.466 INFO 708 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-09-23 16:53:08.497 INFO 708 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-09-23 16:53:08.497 INFO 708 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.17]
2020-09-23 16:53:08.646 INFO 708 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-09-23 16:53:08.647 INFO 708 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1613 ms
2020-09-23 16:53:08.967 INFO 708 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :

Using generated security password: 970ff480-0c7d-4cd0-b657-000c23a68ab4

2020-09-23 16:53:09.148 INFO 708 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6813a331, org.springframework.security.web.context.SecurityContextPersistenceFilter@27494e46, org.springframework.security.web.header.HeaderWriterFilter@68105edc, org.springframework.security.web.csrf.CsrfFilter@6e4ea0bd, org.springframework.security.web.authentication.logout.LogoutFilter@3e598df9, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1e411d81, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@75504cef, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1bd81830, org.springframework.security.web.session.SessionManagementFilter@470a9030, org.springframework.security.web.access.ExceptionTranslationFilter@28782602]
2020-09-23 16:53:09.373 INFO 708 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-09-23 16:53:09.561 INFO 708 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
2020-09-23 16:53:09.710 INFO 708 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-09-23 16:53:09.715 INFO 708 --- [ main] c.m.a.m.MsalWebSampleApplication : Started MsalWebSampleApplication in 3.211 seconds (JVM running for 4.717)
2020-09-23 16:53:29.556 INFO 708 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-09-23 16:53:29.556 INFO 708 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-09-23 16:53:29.562 INFO 708 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 6 ms

Failed to validate data received from Authorization service - could not validate state

Has anyone faced this issue? How can I resolve this?

答案1

得分: 1

这个问题在 GitHub 上已经得到解决,并且已经修复。请查看此处提供的解决方案 here

英文:

This issue was already addressed on GitHub and was already fixed. Please go through the solution given here .

huangapple
  • 本文由 发表于 2020年9月23日 23:20:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/64031169.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定