我正在尝试用RestAuthentication (cas服务器-支持-rest-身份验证)取代RestAuthentication(cas server-support-mongo)。以下是我迄今所取得的成就:
[36m2021-12-18 00:19:18,155 DEBUG [org.apereo.cas.adaptors.rest.RestAuthenticationHandler]
- <REST authentication response received
[{"_class":"org.apereo.cas.authentication.principal.SimplePrincipal","id":"myemail@gmail.com","attributes":{}}]>以下是CAS抛出的错误
ERROR [org.apereo.cas.adaptors.rest.RestAuthenticationHandler]
- <Could not resolve subtype of [simple type, class org.apereo.cas.authentication.principal.Principal]:
missing type id property '@class'我很确定我的REST响应有id
return {
'@class': "org.apereo.cas.authentication.principal.SimplePrincipal",
'id': 'myemail@gmail.com',
'attributes': {}
}我试过所有的@class或_class。他们两个人都一点用都没有。
终于来了。卡斯说
Unable to detect the authentication principal for myemail@gmail.com请你告诉我忘了什么好吗?
THanks、Quang
发布于 2021-12-18 08:09:00
我不懂java,我有同样的问题,我只是使用错误日志并阅读文档来尝试,也许json可以帮助您。
{
"@class": "org.apereo.cas.authentication.principal.SimplePrincipal",
"id": "abc",
"attributes": {
"@class": "java.util.LinkedHashMap",
"username": [
"java.util.List",
["jackson"]
]
}
}https://stackoverflow.com/questions/70400279
复制相似问题