Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增自己oauth2 server,一直报错,希望大佬指点一下 #53

Closed
kevin518 opened this issue Jul 22, 2024 · 10 comments
Closed

Comments

@kevin518
Copy link

kevin518 commented Jul 22, 2024

 [c3e5d8de-4343]  500 Server Error for HTTP GET "/login/oauth2/code/shenji?code=sZgylY&state=CVR7a4iSL4A9ia-Z_BML-St-JbyX4-0dDd15aAqlhEA%3D"
 java.lang.IllegalStateException: No provider found for class org.springframework.security.oauth2.client.authentication.OAuth2AuthorizationCodeAuthenticationToken
	at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:124) ~[spring-security-web-6.3.1.jar:6.3.1]
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	*__checkpoint ? run.halo.oauth.Oauth2Authenticator [DefaultWebFilterChain]
	*__checkpoint ? run.halo.oauth.Oauth2AuthorizationRequestRedirectWebFilter [DefaultWebFilterChain]
	*__checkpoint ? run.halo.app.webfilter.AdditionalWebFilterChainProxy [DefaultWebFilterChain]
	*__checkpoint ? HTTP GET "/login/oauth2/code/shenji?code=sZgylY&state=CVR7a4iSL4A9ia-Z_BML-St-JbyX4-0dDd15aAqlhEA%3D" [ExceptionHandlingWebHandler]
Original Stack Trace:
		at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:124) ~[spring-security-web-6.3.1.jar:6.3.1]
		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:45) ~[reactor-core-3.6.7.jar:3.6.7]
		at reactor.core.publisher.Mono.subscribe(Mono.java:4568) ~[reactor-core-3.6.7.jar:3.6.7]
		at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:82) ~[reactor-core-3.6.7.jar:3.6.7]
		at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147) ~[reactor-core-3.6.7.jar:3.6.7]
@hhhguany
Copy link

遇到了同样的问题~

@JohnNiang
Copy link
Contributor

Hi @kevin518 & @hhhguany , thank you for reaching out here!

建议提供一下完整的复现步骤。方便我们排查问题。

/triage needs-information

@f2c-ci-robot f2c-ci-robot bot added the triage/needs-information Indicates an issue needs more information in order to work on it. label Oct 21, 2024
@hhhguany
Copy link

我的完整报错信息如下:

2024-10-21T23:53:44.472+08:00 ERROR 7 --- [tor-tcp-epoll-9] a.w.r.e.AbstractErrorWebExceptionHandler : [78477475-546]  500 Server Error for HTTP GET "/login/oauth2/code/nas?code=07SSLCRcNlUxQrKblrIcjCUPgkPDfHrY&state=0kDgWBXN1KXzweel4_-m09JQ0vk6ftnm4-JQqOk1tOo="
 
java.lang.IllegalStateException: No provider found for class org.springframework.security.oauth2.client.authentication.OAuth2AuthorizationCodeAuthenticationToken
    at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:124) ~[spring-security-web-6.4.0-M4.jar:6.4.0-M4]
 	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
 Error has been observed at the following site(s):
 	*__checkpoint ⇢ run.halo.oauth.HaloOAuth2AuthenticationWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
 	*__checkpoint ⇢ MapOAuth2AuthenticationFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢  [DefaultWebFilterChain]
 	*__checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
 	*__checkpoint ⇢ run.halo.oauth.HaloOAuth2RedirectWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
 	*__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ CorsWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ SecurityWebFilterChainProxy [DefaultWebFilterChain]
 	*__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
 	*__checkpoint ⇢ run.halo.seo.tools.AdvancedRedirectWebFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ run.halo.comment.widget.captcha.CommentCaptchaFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ run.halo.seo.tools.CrawlRecordFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ run.halo.app.infra.webfilter.AdditionalWebFilterChainProxy [DefaultWebFilterChain]
 	*__checkpoint ⇢ org.springframework.web.filter.reactive.ServerWebExchangeContextFilter [DefaultWebFilterChain]
 	*__checkpoint ⇢ HTTP GET "/login/oauth2/code/nas?code=07SSLCRcNlUxQrKblrIcjCUPgkPDfHrY&state=0kDgWBXN1KXzweel4_-m09JQ0vk6ftnm4-JQqOk1tOo=" [ExceptionHandlingWebHandler]
 Original Stack Trace:
 		at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:124) ~[spring-security-web-6.4.0-M4.jar:6.4.0-M4]
 		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:45) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Mono.subscribe(Mono.java:4576) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:82) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Operators.complete(Operators.java:137) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:46) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Mono.subscribe(Mono.java:4576) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:205) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:53) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:63) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoUsingWhen$MonoUsingWhenSubscriber.deferredComplete(MonoUsingWhen.java:268) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxUsingWhen$CommitInner.onComplete(FluxUsingWhen.java:532) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Operators.complete(Operators.java:137) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:46) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Mono.subscribe(Mono.java:4576) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxUsingWhen$UsingWhenSubscriber.onComplete(FluxUsingWhen.java:389) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:159) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Operators$MonoInnerProducerBase.complete(Operators.java:2864) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:180) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2231) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxUsingWhen$UsingWhenSubscriber.deferredComplete(FluxUsingWhen.java:397) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxUsingWhen$CommitInner.onComplete(FluxUsingWhen.java:532) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2231) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2231) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:210) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:210) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.pool.SimpleDequePool.maybeRecycleAndDrain(SimpleDequePool.java:540) ~[reactor-pool-1.1.0-M5.jar:1.1.0-M5]
 		at reactor.pool.SimpleDequePool$QueuePoolRecyclerInner.onComplete(SimpleDequePool.java:781) ~[reactor-pool-1.1.0-M5.jar:1.1.0-M5]
 		at reactor.core.publisher.Operators.complete(Operators.java:137) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:46) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.Mono.subscribe(Mono.java:4576) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.pool.SimpleDequePool$QueuePoolRecyclerMono.subscribe(SimpleDequePool.java:893) ~[reactor-pool-1.1.0-M5.jar:1.1.0-M5]
 		at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:241) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:204) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber.onComplete(MonoIgnoreElements.java:89) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onComplete(MonoFlatMapMany.java:261) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onComplete(FluxPeekFuseable.java:277) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onComplete(FluxContextWrite.java:126) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at io.asyncer.r2dbc.mysql.internal.util.DiscardOnCancelSubscriber.onComplete(DiscardOnCancelSubscriber.java:84) ~[r2dbc-mysql-1.3.0.jar:1.3.0]
 		at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onComplete(FluxPeekFuseable.java:940) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.onNext(FluxHandle.java:359) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.onNext(FluxPeekFuseable.java:854) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:476) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.SinkManyEmitterProcessor.tryEmitNext(SinkManyEmitterProcessor.java:273) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at io.asyncer.r2dbc.mysql.client.ReactorNettyClient$ResponseSink.next(ReactorNettyClient.java:394) ~[r2dbc-mysql-1.3.0.jar:1.3.0]
 		at io.asyncer.r2dbc.mysql.client.ReactorNettyClient.lambda$new$0(ReactorNettyClient.java:119) ~[r2dbc-mysql-1.3.0.jar:1.3.0]
 		at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:185) ~[reactor-core-3.7.0-M6.jar:3.7.0-M6]
 		at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:294) ~[reactor-netty-core-1.2.0-M5.jar:1.2.0-M5]
 		at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:403) ~[reactor-netty-core-1.2.0-M5.jar:1.2.0-M5]
 		at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:425) ~[reactor-netty-core-1.2.0-M5.jar:1.2.0-M5]
 		at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:115) ~[reactor-netty-core-1.2.0-M5.jar:1.2.0-M5]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1495) ~[netty-handler-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1358) ~[netty-handler-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1407) ~[netty-handler-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530) ~[netty-codec-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469) ~[netty-codec-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[netty-codec-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) ~[netty-transport-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799) ~[netty-transport-classes-epoll-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501) ~[netty-transport-classes-epoll-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399) ~[netty-transport-classes-epoll-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.113.Final.jar:4.1.113.Final]
 		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.113.Final.jar:4.1.113.Final]
 		at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
``

@JohnNiang
Copy link
Contributor

需要提供完整的复现步骤,否则我没办法调试并解决问题。

@a2008q
Copy link

a2008q commented Oct 23, 2024

#23
之前通过上面那个issue增加了authProvider和clientRegistration可以正常使用,这次合并代码遇到了一样的错误

@a2008q
Copy link

a2008q commented Oct 23, 2024

#23 之前通过上面那个issue增加了authProvider和clientRegistration可以正常使用,这次合并代码遇到了一样的错误
我是用的idaas是Logto的自建版本
具体复现步骤 1.在auth-provider.yaml增加

---
apiVersion: auth.halo.run/v1alpha1
kind: AuthProvider
metadata:
  name: logto
  labels:
    auth.halo.run/auth-binding: "true"
spec:
  displayName: Logto
  description: Logto is an Auth0 alternative designed for modern apps and SaaS products. It offers a seamless developer experience and is well-suited for individuals and growing companies.
  logo: /plugins/plugin-oauth2/assets/static/logto.svg
  website: https://logto.io
  authenticationUrl: /oauth2/authorization/logto
  bindingUrl: /oauth2/authorization/logto
  unbindUrl: /apis/uc.api.auth.halo.run/v1alpha1/user-connections/logto/disconnect
  authType: oauth2
  settingRef:
    name: generic-oauth2-setting
    group: genericOauth
  configMapRef:
    name: oauth2-logto-config

2.在client-registrations.yaml增加

---
apiVersion: oauth.halo.run/v1alpha1
kind: Oauth2ClientRegistration
metadata:
  name: logto
spec:
  clientAuthenticationMethod: "client_secret_basic"
  authorizationGrantType: "authorization_code"
  redirectUri: "{baseUrl}/login/oauth2/code/logto"
  scopes:
    - "openid"
    - "profile"
    - "email"
  authorizationUri: "****"
  tokenUri: "****"
  userInfoUri: "****"
  userInfoAuthenticationMethod: "header"
  userNameAttributeName: "username"
  clientName: "Logto"

@JohnNiang
Copy link
Contributor

Hi @a2008q ,感谢提供详细的复现步骤,我将尝试复现并调试。

另外,新增 AuthProvider 和 Oauth2ClientRegistration 并不需要重新构建项目,可以参考:#23 (comment).

@JohnNiang
Copy link
Contributor

出现以上问题的原因,可能是大家的认证服务器采用的 OIDC 协议,而不是 OAuth2 协议。当前插件暂时还不支持 OIDC 协议进行登录。不过我已经尝试修改少部分代码即可支持 OIDC 协议。

/assign

@JohnNiang
Copy link
Contributor

/remove-triage needs-information
/unassign

Closes in favor of #68.

/close

@f2c-ci-robot f2c-ci-robot bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Oct 23, 2024
@f2c-ci-robot f2c-ci-robot bot closed this as completed Oct 23, 2024
Copy link

f2c-ci-robot bot commented Oct 23, 2024

@JohnNiang: Closing this issue.

In response to this:

/remove-triage needs-information
/unassign

Closes in favor of #68.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants