我成功配置了一个带ldap的cas服务器。登录工作正常 现在,我尝试按照以下说明配置其余协议: http://jasig.github.io/cas/4.0.x/protocol/REST-Protocol.html
我使用restclient tu发送此POST请求:
https://localhost:8443/cas/v1/tickets
username=myUser
password=myPassword
我收到错误的400。 cas服务器上有日志:
2015-01-21 13:41:50,513 DEBUG [org.jasig.cas.integration.restlet.TicketResource] - <Obtaining credentials...>
2015-01-21 13:41:50,513 DEBUG [org.jasig.cas.integration.restlet.TicketResource] - <>
2015-01-21 13:41:50,513 INFO [org.jasig.cas.authentication.PolicyBasedAuthenticationManager] - <LdapAuthenticationHandler failed authenticating null+password>
2015-01-21 13:41:50,514 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: supplied credentials: [null+password]
ACTION: AUTHENTICATION_FAILED
APPLICATION: CAS
WHEN: Wed Jan 21 13:41:50 CET 2015
CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
SERVER IP ADDRESS: 0.0.0.0
=============================================================
>
2015-01-21 13:41:50,514 INFO [org.perf4j.TimingLogger] - <start[1421844110513] time[0] tag[AUTHENTICATE]>
2015-01-21 13:41:50,514 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: audit:unknown
WHAT: 1 errors, 0 successes
ACTION: TICKET_GRANTING_TICKET_NOT_CREATED
APPLICATION: CAS
WHEN: Wed Jan 21 13:41:50 CET 2015
CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1
SERVER IP ADDRESS: 0.0.0.0
=============================================================
>
2015-01-21 13:41:50,514 INFO [org.perf4j.TimingLogger] - <start[1421844110513] time[0] tag[CREATE_TICKET_GRANTING_TICKET]>
2015-01-21 13:41:50,514 ERROR [org.jasig.cas.integration.restlet.TicketResource] - <1 errors, 0 successes>
org.jasig.cas.authentication.AuthenticationException: 1 errors, 0 successes
[...]
似乎提供的凭据为空。
造成这种错误的原因是什么?
谢谢你的帮助
答案 0 :(得分:1)
您好,我目前遇到同样的问题。如果api由java客户端调用而不是201使用rest chrome扩展,我得到400。 BTW我发现的唯一线索是http://restlet-discuss.1400322.n2.nabble.com/Servlet-Filter-using-request-getParameter-loses-Form-data-td2141035.html