I'm making a QR code login test, after 2 nights of hard work, the JWT 
generated and the QR code shows up. But when I send jwt token to CAS via 
websocket, login failed with messages:

*Unauthorized Access*

*Either the authentication request was rejected/cancelled, or the 
authentication provider denied access due to permissions, etc. Review logs 
to find the root cause of the issue.*

* Authentication response provided to CAS by the external identity provider 
cannot be accepted.*

And these logs in console, I googled every thing and still have no idea 
what's going on and hope you good guys help me out, thank you
2022-10-25 13:47:46,794 DEBUG 
[org.apereo.cas.qr.web.flow.QRAuthenticationValidateTokenAction] - 
<Received QR token [....] with device identifier [firefox]>
*2022-10-25 13:47:46,794 DEBUG 
[org.apereo.cas.web.FlowExecutionExceptionResolver] - <Ignoring the 
received exception 
[org.springframework.webflow.execution.ActionExecutionException: Exception 
thrown executing 
org.apereo.cas.web.flow.action.SurrogateInitialAuthenticationAction@77c8b276 
in state 'realSubmit' of flow 'login' -- action execution attributes were 
'map[[empty]]'] due to a type mismatch with handler 
[[FlowHandlerMapping.DefaultFlowHandler@35a39785]]>*
*2022-10-25 13:47:46,798 ERROR 
[org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/cas].[dispatcherServlet]]
 
- <Servlet.service() for servlet [dispatcherServlet] in context with path 
[/cas] threw exception [Request processing failed; nested exception is 
org.springframework.webflow.execution.ActionExecutionException: Exception 
thrown executing 
org.apereo.cas.web.flow.action.SurrogateInitialAuthenticationAction@77c8b276 
in state 'realSubmit' of flow 'login' -- action execution attributes were 
'map[[empty]]'] with root cause>*
*java.lang.ClassCastException: credential [...... is of type class 
org.apereo.cas.qr.authentication.QRAuthenticationTokenCredential when we 
were expecting class 
org.apereo.cas.authentication.credential.UsernamePasswordCredential*
at org.apereo.cas.web.support.WebUtils.getCredential(WebUtils.java:452) 
~[cas-server-core-web-api-6.6.1.jar!/:6.6.1]
at 
org.apereo.cas.web.flow.action.SurrogateInitialAuthenticationAction.doExecute(SurrogateInitialAuthenticationAction.java:30)
 
~[cas-server-support-surrogate-webflow-6.6.1.jar!/:6.6.1]
at 
org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at org.springframework.webflow.engine.State.enter(State.java:194) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.Transition.execute(Transition.java:228) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at org.springframework.webflow.engine.State.enter(State.java:194) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.Transition.execute(Transition.java:228) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:231) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:195) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at org.springframework.webflow.engine.Flow.resume(Flow.java:537) 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:168)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:254)
 
~[spring-webflow-2.5.1.RELEASE.jar!/:2.5.1.RELEASE]
at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1070)
 
~[spring-webmvc-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
 
~[spring-webmvc-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
 
~[spring-webmvc-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
 
~[spring-webmvc-5.3.22.jar!/:5.3.22]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:665) 
~[javax.servlet-api-4.0.1.jar!/:4.0.1]
at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
 
~[spring-webmvc-5.3.22.jar!/:5.3.22]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) 
~[javax.servlet-api-4.0.1.jar!/:4.0.1]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 
~[tomcat-embed-websocket-9.0.67.jar!/:?]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:67)
 
~[spring-webmvc-5.3.22.jar!/:5.3.22]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apereo.cas.web.support.AuthenticationCredentialsThreadLocalBinderClearingFilter.doFilter(AuthenticationCredentialsThreadLocalBinderClearingFilter.java:28)
 
~[cas-server-core-web-api-6.6.1.jar!/:6.6.1]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apereo.cas.web.support.filters.RequestParameterPolicyEnforcementFilter.doFilter(RequestParameterPolicyEnforcementFilter.java:401)
 
~[cas-server-core-web-api-6.6.1.jar!/:6.6.1]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apereo.cas.web.support.filters.ResponseHeadersEnforcementFilter.doFilter(ResponseHeadersEnforcementFilter.java:209)
 
~[cas-server-core-web-api-6.6.1.jar!/:6.6.1]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apereo.cas.web.support.filters.AddResponseHeadersFilter.doFilter(AddResponseHeadersFilter.java:62)
 
~[cas-server-core-web-api-6.6.1.jar!/:6.6.1]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
 
~[spring-security-web-5.7.3.jar!/:5.7.3]
at 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186)
 
~[spring-security-web-5.7.3.jar!/:5.7.3]
at 
org.springframework.security.web.debug.DebugFilter.invokeWithWrappedRequest(DebugFilter.java:90)
 
~[spring-security-web-5.7.3.jar!/:5.7.3]
at 
org.springframework.security.web.debug.DebugFilter.doFilter(DebugFilter.java:78)
 
~[spring-security-web-5.7.3.jar!/:5.7.3]
at 
org.springframework.security.web.debug.DebugFilter.doFilter(DebugFilter.java:67)
 
~[spring-security-web-5.7.3.jar!/:5.7.3]
at 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
 
~[spring-boot-actuator-2.7.3.jar!/:2.7.3]
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apereo.cas.logging.web.ThreadContextMDCServletFilter.doFilter(ThreadContextMDCServletFilter.java:104)
 
~[cas-server-core-logging-6.6.1.jar!/:6.6.1]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apereo.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:66)
 
~[inspektr-common-1.8.20.GA.jar!/:?]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
 
~[spring-web-5.3.22.jar!/:5.3.22]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769) 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 
~[tomcat-embed-core-9.0.67.jar!/:9.0.67]
at java.lang.Thread.run(Thread.java:829) ~[?:?]

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/df594c08-c697-490b-bb91-5b63a28f75f6n%40apereo.org.

Reply via email to