zoukankan      html  css  js  c++  java
  • 轻松搭建CAS 5.x系列(9)-登录后显示通知信息

    概述说明


    用户在账号名密码认证通过后,CAS可以跳转到登陆完成页面前,显示相关的通知页面。

    搭建步骤


    `1. 首先,您需要有个CAS Server端

    如果您没有,可以按照我之前写的文章《轻松搭建CAS 5.x系列文章》系列的前3篇文章搭建好CAS Server。

     

    `2. 在pom.xml增加依赖包

    1         <!-- Authentication Interrupt Begin -->     
    2         <dependency>
    3           <groupId>org.apereo.cas</groupId>
    4           <artifactId>cas-server-support-interrupt-webflow</artifactId>
    5           <version>${cas.version}</version>
    6         </dependency>
    7         <!-- Authentication Interrupt End -->  

     

    -3. 编写中断的配置文件

    D:casoverlaycas-overlay-templatesrcmain esourcesinterrupt.json

    {
      "admin" : {
        "message" : "Announcement message <strong>goes here</strong>.",
        "links" : {
          "Go to Location1" : "https://www.location1.com",
          "Go to Location2" : "https://www.location2.com"
        },
        "block" : false,
        "ssoEnabled" : false,
        "interrupt" : true,
        "autoRedirect" : false,
        "autoRedirectAfterSeconds" : -1
      }
    }

     

    `4. application.properties增加配置文件

    1 cas.interrupt.json.location=classpath:/interrupt.json

     

    -5. OK,可以打包了

    1 mvn package

     

    -6. 打包后打targetcas.war部署到tomcat

     

    搭建OK了,我们来验证下功能

     

    功能演示


    启动tomcat,看下效果

     

    参考文章


    1.CAS中文文档站点#notifications

    最后,大家想更多CAS了解的话,可以来CAS中文文档站点(http://www.cassso-china.cn)来瞅瞅

     

  • 相关阅读:
    Stm32ADC-内部温度传感器的使用
    Stm32 ADC学习
    wpf数据绑定
    06 MyBatis——实体类注意事项
    05 MyBatis——环境搭建及demo
    96 项目导jar包
    04 SSM框架概述
    03 MVC开发模式
    02 Mybaits——包名的命名规范
    26 监听器实现网站在线人数统计
  • 原文地址:https://www.cnblogs.com/jpeanut/p/9463003.html
Copyright © 2011-2022 走看看