CAS Apereo REST API - 身份验证失败

时间:2018-02-01 09:43:54

标签: rest maven authentication cas

我尝试配置Apereo CAS 5.0.6 REST API,并且当我发送POST请求以获取TGT时,我收到此错误:

WARN [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - 
<Authentication has failed. Credentials may be incorrect or CAS cannot find authentication
handler that supports [username] of type [UsernamePasswordCredential], which suggests a configuration problem.>

我在Firefox上使用RESTED尝试过这个:

  • 网址:https://cas.services/cas/v1/tickets
  • 方法:POST
  • 标题:内容类型应用程序/ x-www-form-urlencoded
  • 请求正文:URLEncoded表单数据(使用用户名和密码表单字段)

我也有401。

我使用Docker镜像apereo / cas:v5.0.6。

我的pom.xml:

<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-webapp</artifactId>
    <version>${cas.version}</version>
    <type>war</type>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-spnego-webflow</artifactId>
    <version>${cas.version}</version>
</dependency>
<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-rest</artifactId>
    <version>${cas.version}</version>
    <scope>runtime</scope>
</dependency>
<dependency>
    <groupId>org.samba.jcifs</groupId>
    <artifactId>jcifs-ext</artifactId>
    <version>0.9.4</version>
    <scope>runtime</scope>
</dependency>

当我使用Firefox

转到https://cas.services/cas/时,验证工作正常

1 个答案:

答案 0 :(得分:0)

它缺少cas.propeties中的cas.authn.ldap配置...