kawhii / sso

cas单点登录系统,其中包括cas认证服务,配置中心,监控平台,服务管理的高可用项目

Home Page:https://kawhii.github.io/sso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Kaptcha

HMYDK opened this issue · comments

commented

5.1.5如何集成google的kaptcha 期待更新

@PARANOIA-ZK

谷歌的验证码将不会集成到本项目,当前还没有计划会出教程,因为国内用谷歌验证的比较少,但自定义验证码的有必要的情况下会讲


谷歌验证码教程

  1. 到谷歌开放平台申请appid以及秘钥

  2. 添加依赖

<dependency>
     <groupId>org.apereo.cas</groupId>
     <artifactId>cas-server-support-captcha</artifactId>
     <version>${cas.version}</version>
</dependency>
  1. 配置

application.properties

cas.googleRecaptcha.verifyUrl=https://www.google.com/recaptcha/api/siteverify
cas.googleRecaptcha.siteKey=申请得到的siteKey
cas.googleRecaptcha.secret=申请得到的秘钥
  1. 打开默认主题即会显示谷歌验证码
commented

谢谢回复