轻松搭建CAS 5.x系列(9)-登录后显示通知信息

概述说明

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

搭建步骤

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

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

        <!-- Authentication Interrupt Begin -->     
        <dependency>
          <groupId>org.apereo.cas</groupId>
          <artifactId>cas-server-support-interrupt-webflow</artifactId>
          <version>${cas.version}</version>
        </dependency>
        <!-- Authentication Interrupt End -->  

-3. 编写中断的配置文件
D:\casoverlay\cas-overlay-template\src\main\resources\interrupt.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增加配置文件

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

-5. OK,可以打包了

mvn package

-6. 打包后打target\cas.war部署到tomcat

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

功能演示

启动tomcat,看下效果
这里写图片描述

参考文章

  1. CAS中文文档站点#notifications

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值