zoukankan      html  css  js  c++  java
  • CAS5.3.0安装部署

    部署环境:JDK1.8.x  maven-3.5.2  tomcat-8.x.x

    1.下载地址

    https://github.com/apereo/cas-overlay-template/tree/5.3

    2.添加组件

    2.1数据库设置

    2.1.1编辑pom.xml并打包:mvn package

    cas-overlay-template-5.3/pom.xml

    <dependency>
        <groupId>org.apereo.cas</groupId>
        <artifactId>cas-server-support-jdbc</artifactId>
        <version>${cas.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apereo.cas</groupId>
        <artifactId>cas-server-support-jdbc-drivers</artifactId>
        <version>${cas.version}</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.46</version>
    </dependency>

    2.1.2编辑application.properties文件

    cas-overlay-template-5.3 argetcasWEB-INFclassesapplication.properties

    注释掉cas.authn.accept.users

    #cas.authn.accept.users=casuser::Mellon

    添加数据库设置

    #mysql
    cas.authn.jdbc.query[0].sql=select * from account where account = ?
    cas.authn.jdbc.query[0].url=jdbc:mysql://localhost:3306/account?characterEncoding=utf-8
    cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect
    cas.authn.jdbc.query[0].user=root
    cas.authn.jdbc.query[0].password=password
    cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver
    cas.authn.jdbc.query[0].fieldPassword=password
    cas.authn.jdbc.query[0].passwordEncoder.type=NONE
    cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8

    2.2 CAS restful设置

    2.2.1编辑pom.xml并打包:mvn package

    <dependency>
        <groupId>org.apereo.cas</groupId>
        <artifactId>cas-server-support-rest</artifactId>
        <version>${cas.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apereo.cas</groupId>
        <artifactId>cas-server-support-rest-authentication</artifactId>
        <version>${cas.version}</version>
    </dependency>

    2.2.2编辑application.properties文件

    路径:cas-overlay-template-5.3 argetcasWEB-INFclassesapplication.properties

    添加cas restful设置

    #cas restful
    cas.tgc.secure=false
    cas.serviceRegistry.initFromJson=true
    cas.authn.rest.uri=http://localhost:8080/cas/v1
    cas.authn.rest.passwordEncoder.type=NONE
    cas.authn.rest.passwordEncoder.characterEncoding=UTF-8

    2.2.3编辑casWEB-INFclassesservicesHTTPSandIMAPS-10000001.json

    添加http协议

     3.postman测试结果

    3.1 TGT票据

     

    3.2 ST票据

  • 相关阅读:
    sdk 和 Open API 有什么区别
    分布式锁介绍
    K8s 资源更新机制详解 (ResourceVersion 与 patch)
    Pod 一直处于pending状态但是kubectl describe和logs都没有输出信息的原因
    CAP 理论详解
    kubebuilder中的controller:latest是什么镜像
    Codeforces Round #441 (Div. 1, by Moscow Team Olympiad)
    Matrix Tree 定理及证明
    Codeforces Global Round 15 题解
    Harbour.Space Scholarship Contest 2021-2022 (Div. 1 + Div. 2) 题解
  • 原文地址:https://www.cnblogs.com/Jiphen/p/10510681.html
Copyright © 2011-2022 走看看