TicketGrantingTicketImpl 异常 - 中央身份验证服务 7.0.2

TicketGrantingTicketImpl 异常 - 中央身份验证服务 7.0.2

我使用来自 github 的委托身份提供者。它运行正常,并成功授权我在 cas 中的帐户。

2024-03-26 15:05:02,752 ERROR 
[org.apereo.cas.util.serialization.AbstractJacksonBackedStringSerializer] - <Cannot read/parse [{"@class":"org.apereo.cas.ticket.TicketGrantingTicketImpl","@id":1,"id":"TGT-1-********qFm6SjQ17y...] to deserialize into type [class org.apereo.cas.ticket.TicketGrantingTicketImpl]. This may be caused in the absence of a configuration/support module that knows how to interpret the fragment, specially if the fragment describes a CAS registered service definition. Internal parsing error is [Cannot construct instance of `org.pac4j.oauth.credentials.OAuth20Credentials` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 2090] (through reference chain: org.apereo.cas.ticket.TicketGrantingTicketImpl["authentication"]->org.apereo.cas.authentication.DefaultAuthentication["credentials"]->java.util.ArrayList[0]->org.apereo.cas.authentication.principal.ClientCredential["credentials"])]>
2024-03-26 15:05:02,758 ERROR [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <INVALID_TICKET
 DefaultTicketStringSerializationManager.java:deserializeTicket:60
 DefaultTicketStringSerializationManager.java:lambda$deserializeTicket$1:49
 Unchecked.java:lambda$supplier$38:1695
>
2024-03-26 15:05:52,249 INFO [org.apereo.cas.services.mgmt.AbstractServicesManager] - <Loaded [2] service(s) from [EmbeddedResourceBasedServiceRegistry].>
2024-03-26 15:06:35,242 ERROR [org.apereo.cas.util.serialization.AbstractJacksonBackedStringSerializer] - <Cannot read/parse [{"@class":"org.apereo.cas.ticket.TicketGrantingTicketImpl","@id":1,"id":"TGT-1-********qFm6SjQ17y...] to deserialize into type [class org.apereo.cas.ticket.TicketGrantingTicketImpl]. This may be caused in the absence of a configuration/support module that knows how to interpret the fragment, specially if the fragment describes a CAS registered service definition. Internal parsing error is [Cannot construct instance of `org.pac4j.oauth.credentials.OAuth20Credentials` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 2090] (through reference chain: org.apereo.cas.ticket.TicketGrantingTicketImpl["authentication"]->org.apereo.cas.authentication.DefaultAuthentication["credentials"]->java.util.ArrayList[0]->org.apereo.cas.authentication.principal.ClientCredential["credentials"])]>
2024-03-26 15:06:35,342 ERROR [org.apereo.cas.util.serialization.AbstractJacksonBackedStringSerializer] - <Cannot read/parse [{"@class":"org.apereo.cas.ticket.TicketGrantingTicketImpl","@id":1,"id":"TGT-1-********qFm6SjQ17y...] to deserialize into type [class org.apereo.cas.ticket.TicketGrantingTicketImpl]. This may be caused in the absence of a configuration/support module that knows how to interpret the fragment, specially if the fragment describes a CAS registered service definition. Internal parsing error is [Cannot construct instance of `org.pac4j.oauth.credentials.OAuth20Credentials` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 2090] (through reference chain: org.apereo.cas.ticket.TicketGrantingTicketImpl["authentication"]->org.apereo.cas.authentication.DefaultAuthentication["credentials"]->java.util.ArrayList[0]->org.apereo.cas.authentication.principal.ClientCredential["credentials"])]>
2024-03-26 15:06:35,353 ERROR [org.apereo.cas.util.serialization.AbstractJacksonBackedStringSerializer] - <Cannot read/parse [{"@class":"org.apereo.cas.ticket.TicketGrantingTicketImpl","@id":1,"id":"TGT-1-********qFm6SjQ17y...] to deserialize into type [class org.apereo.cas.ticket.TicketGrantingTicketImpl]. This may be caused in the absence of a configuration/support module that knows how to interpret the fragment, specially if the fragment describes a CAS registered service definition. Internal parsing error is [Cannot construct instance of `org.pac4j.oauth.credentials.OAuth20Credentials` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 2090] (through reference chain: org.apereo.cas.ticket.TicketGrantingTicketImpl["authentication"]->org.apereo.cas.authentication.DefaultAuthentication["credentials"]->java.util.ArrayList[0]->org.apereo.cas.authentication.principal.ClientCredential["credentials"])]>
2024-03-26 15:06:52,256 INFO [org.apereo.cas.services.mgmt.AbstractServicesManager] - <Loaded [2] service(s) from [EmbeddedResourceBasedServiceRegistry].>

但是控制台记录了下面的问题(票证注册到redis中)。

org.pac4j.oauth.credentials.OAuth20Credentials 是 org.pac4j.pac4j-oauth:6.0.0 pom 下的一个类文件,默认没有提供无参数构造函数,代码在 cas 6.6.0 版本下可以正常工作。

cas.authn.pac4j.github.id=xxx
cas.authn.pac4j.github.secret=xxx
cas.authn.pac4j.github.client-name=github
cas.authn.pac4j.github.callback-url=https://xxx.goho.co

如何修复?

相关内容