Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
5076849e
MaxKey
项目概览
yujianwangzivayy
/
MaxKey
与 Fork 源项目一致
Fork自
MaxKey单点登录官方(MaxKeyTop) / MaxKey
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5076849e
编写于
5月 15, 2020
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
登录验证码
上级
0e44a18f
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
194 addition
and
0 deletion
+194
-0
docs/_includes/navigation.html
docs/_includes/navigation.html
+1
-0
docs/authn/captcha.md
docs/authn/captcha.md
+181
-0
docs/images/authn/captcha_arithmetic.png
docs/images/authn/captcha_arithmetic.png
+0
-0
docs/images/authn/captcha_text.png
docs/images/authn/captcha_text.png
+0
-0
maxkey-web-maxkey/src/main/webapp/NewFile.jsp
maxkey-web-maxkey/src/main/webapp/NewFile.jsp
+12
-0
未找到文件。
docs/_includes/navigation.html
浏览文件 @
5076849e
...
...
@@ -16,6 +16,7 @@
<li
class=
""
>
<a
href=
"#"
><span
class=
"icon-chevron-down"
></span>
登录集成
</a>
<ul
class=
"nav nav-list"
>
<li
class=
""
><a
href=
"{{site.baseurl}}/authn/captcha.html"
><span
class=
"none"
></span>
登录验证码
</a></li>
<li
class=
""
><a
href=
"{{site.baseurl}}/authn/social.html"
><span
class=
"none"
></span>
社交集成
</a></li>
<li
class=
""
><a
href=
"{{site.baseurl}}/authn/google.html"
><span
class=
"none"
></span>
Google Authenticator
</a></li>
<li
class=
""
><a
href=
"{{site.baseurl}}/authn/kerberos.html"
><span
class=
"none"
></span>
Kerberos/Spengo/AD
</a></li>
...
...
docs/authn/captcha.md
0 → 100644
浏览文件 @
5076849e
<h3>
验证码
</h3>
验证码(CAPTCHA)是“Completely Automated Public Turing test to tell Computers and Humans Apart”(全自动区分计算机和人类的图灵测试)的缩写,是一种区分用户是计算机还是人的公共全自动程序。可以防止用户用特定程序暴力破解方式进行不断的登陆尝试。
文本验证码
<img
src=
"{{ "
/
images
/
authn
/
captcha_text.png
"
|
prepend:
site.baseurl
}}?{{
site.time
|
date:
"%
Y
%
m
%
d
%
H
%
M
"
}}"
alt=
""
/>
算术验证码
<img
src=
"{{ "
/
images
/
authn
/
captcha_arithmetic.png
"
|
prepend:
site.baseurl
}}?{{
site.time
|
date:
"%
Y
%
m
%
d
%
H
%
M
"
}}"
alt=
""
/>
<h3>
验证码配置
</h3>
MaxKey使用kaptcha作为验证码的插件,详细可参考Kaptchar详细配置表
文件
maxkey/config/applicationConfig.properties
<pre><code
class=
"ini hljs"
>
#是否支持验证码
config.login.captcha=true
#text 文本, arithmetic 算术验证码
config.login.captcha.type=text
</code></pre>
<h3>
验证码配置文件
</h3>
文件
maxkey/config/kaptcha.properties
默认配置如下
<pre><code
class=
"ini hljs"
>
#宽度
kaptcha.image.width=80
#长度
kaptcha.image.height=25
kaptcha.border=no
kaptcha.obscurificator.impl=com.google.code.kaptcha.impl.ShadowGimpy
kaptcha.textproducer.font.size=23
#生成字符,默认值为数字
kaptcha.textproducer.char.string=0123456789
#位数
kaptcha.textproducer.char.length=4
kaptcha.noise.impl=com.google.code.kaptcha.impl.NoNoise
</code></pre>
当配置算术验证码时即 config.login.captcha.type=arithmetic
kaptcha的配置中必须为数字
<pre><code
class=
"ini hljs"
>
kaptcha.textproducer.char.string=0123456789
</code></pre>
<h3>
Kaptchar详细配置表
</h3>
<table
border=
"0"
class=
"table table-striped table-bordered "
>
<tbody>
<tr>
<td><strong>
Constant
</strong></td>
<td><strong>
描述
</strong></td>
<td><strong>
默认值
</strong></td>
</tr>
<tr>
<td>
kaptcha.border
</td>
<td>
图片边框,合法值:yes , no
</td>
<td>
yes
</td>
</tr>
<tr>
<td>
kaptcha.border.color
</td>
<td>
边框颜色,合法值: r,g,b (and optional alpha) 或者 white,black,blue.
</td>
<td>
black
</td>
</tr>
<tr>
<td>
kaptcha.border.thickness
</td>
<td>
边框厚度,合法值:
>
0
</td>
<td>
1
</td>
</tr>
<tr>
<td>
kaptcha.image.width
</td>
<td>
图片宽
</td>
<td>
200
</td>
</tr>
<tr>
<td>
kaptcha.image.height
</td>
<td>
图片高
</td>
<td>
50
</td>
</tr>
<tr>
<td>
kaptcha.producer.impl
</td>
<td>
图片实现类
</td>
<td>
com.google.code.kaptcha.impl.DefaultKaptcha
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.impl
</td>
<td>
文本实现类
</td>
<td>
com.google.code.kaptcha.text.impl.DefaultTextCreator
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.char.string
</td>
<td>
文本集合,验证码值从此集合中获取
</td>
<td>
abcde2345678gfynmnpwx
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.char.length
</td>
<td>
验证码长度
</td>
<td>
5
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.font.names
</td>
<td>
字体
</td>
<td>
Arial, Courier
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.font.size
</td>
<td>
字体大小
</td>
<td>
40px.
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.font.color
</td>
<td>
字体颜色,合法值: r,g,b
或者 white,black,blue.
</td>
<td>
black
</td>
</tr>
<tr>
<td>
kaptcha.textproducer.char.space
</td>
<td>
文字间隔
</td>
<td>
2
</td>
</tr>
<tr>
<td>
kaptcha.noise.impl
</td>
<td>
干扰实现类
</td>
<td>
com.google.code.kaptcha.impl.DefaultNoise
</td>
</tr>
<tr>
<td>
kaptcha.noise.color
</td>
<td>
干扰
颜色,合法值: r,g,b 或者 white,black,blue.
</td>
<td>
black
</td>
</tr>
<tr>
<td>
kaptcha.obscurificator.impl
</td>
<td>
图片样式:
<br>
水纹com.google.code.kaptcha.impl.WaterRipple
<br>
鱼眼com.google.code.kaptcha.impl.FishEyeGimpy
<br>
阴影com.google.code.kaptcha.impl.ShadowGimpy
</td>
<td>
com.google.code.kaptcha.impl.WaterRipple
</td>
</tr>
<tr>
<td>
kaptcha.background.impl
</td>
<td>
背景实现类
</td>
<td>
com.google.code.kaptcha.impl.DefaultBackground
</td>
</tr>
<tr>
<td>
kaptcha.background.clear.from
</td>
<td>
背景颜色渐变,开始颜色
</td>
<td>
light grey
</td>
</tr>
<tr>
<td>
kaptcha.background.clear.to
</td>
<td>
背景颜色渐变,
结束颜色
</td>
<td>
white
</td>
</tr>
<tr>
<td>
kaptcha.word.impl
</td>
<td>
文字渲染器
</td>
<td>
com.google.code.kaptcha.text.impl.DefaultWordRenderer
</td>
</tr>
<tr>
<td>
kaptcha.session.key
</td>
<td>
session key
</td>
<td>
KAPTCHA_SESSION_KEY
</td>
</tr>
<tr>
<td>
kaptcha.session.date
</td>
<td>
session date
</td>
<td>
KAPTCHA_SESSION_DATE
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
docs/images/authn/captcha_arithmetic.png
0 → 100644
浏览文件 @
5076849e
13.4 KB
docs/images/authn/captcha_text.png
0 → 100644
浏览文件 @
5076849e
13.2 KB
maxkey-web-maxkey/src/main/webapp/NewFile.jsp
0 → 100644
浏览文件 @
5076849e
<%@ page
language=
"java"
contentType=
"text/html; charset=ISO-8859-1"
pageEncoding=
"ISO-8859-1"
%>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Insert title here
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录