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票据

  • 相关阅读:
    网页加速的14条优化法则 网站开发与优化
    .NET在后置代码中输入JS提示语句(背景不会变白)
    C语言变量声明内存分配
    SQL Server Hosting Toolkit
    An established connection was aborted by the software in your host machine
    C语言程序设计 2009春季考试时间和地点
    C语言程序设计 函数递归调用示例
    让.Net 程序脱离.net framework框架运行
    C语言程序设计 答疑安排(2009春季 110周) 有变动
    软件测试技术,软件项目管理 实验时间安排 2009春季
  • 原文地址:https://www.cnblogs.com/Jiphen/p/10510681.html
Copyright © 2011-2022 走看看