mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
s
This commit is contained in:
parent
5bcf5bb1c6
commit
a7eef1db73
@ -1,3 +1,5 @@
|
||||
<h2>多因素认证(MFA)</h2>
|
||||
|
||||
双因素身份认证就是通过你所知道再加上你所能拥有的这二个要素组合到一起才能发挥作用的身份认证系统。双因素认证是一种采用时间同步技术的系统,采用了基于时间、事件和密钥三变量而产生的一次性密码来代替传统的静态密码。每个动态密码卡都有一个唯一的密钥,该密钥同时存放在服务器端,每次认证时动态密码卡与服务器分别根据同样的密钥,同样的随机参数(时间、事件)和同样的算法计算了认证的动态密码,从而确保密码的一致性,从而实现了用户的认证。就像我们去银行办卡送的口令牌.
|
||||
|
||||
多因素认证(MFA),是一种计算机访问控制的方法,用户要通过两种以上的认证机制之后,才能得到授权,使用计算机资源。MFA的目的是建立一个多层次的防御,使未经授权的人访问计算机系统或网络更加困难,从而提高安全性。
|
||||
|
||||
@ -1 +1,77 @@
|
||||
TODO
|
||||
<h2>第三方账号登录</h2>
|
||||
|
||||
为了方便用户的登录,可以通过第三方的账号(例如新浪微博、微信、钉钉等)登录MaxKey,简单配置即可实现用户登录。
|
||||
|
||||
本文以新浪微博为例
|
||||
|
||||
<img src="{{ "/images/authn/authn_s_1.png" | prepend: site.baseurl }}?{{ site.time | date: "%Y%m%d%H%M" }}" alt=""/>
|
||||
|
||||
<h3>登录流程</h3>
|
||||
|
||||
<img src="{{ "/images/authn/authn_s.png" | prepend: site.baseurl }}?{{ site.time | date: "%Y%m%d%H%M" }}" alt=""/>
|
||||
|
||||
<h3>第三方认证配置</h3>
|
||||
在新浪微博开放平台https://open.weibo.com/申请接入,新浪配置如下
|
||||
|
||||
<img src="{{ "/images/authn/authn_s_2.png" | prepend: site.baseurl }}?{{ site.time | date: "%Y%m%d%H%M" }}" alt=""/>
|
||||
|
||||
<img src="{{ "/images/authn/authn_s_3.png" | prepend: site.baseurl }}?{{ site.time | date: "%Y%m%d%H%M" }}" alt=""/>
|
||||
|
||||
<h3>认证配置</h3>
|
||||
文件
|
||||
maxkey/config/applicationLogin.properties
|
||||
|
||||
<pre><code class="ini hljs">
|
||||
#enable social sign on
|
||||
config.login.socialsignon=true
|
||||
#sina weibo
|
||||
config.socialsignon.sinaweibo.provider=sinaweibo
|
||||
#登录提示
|
||||
config.socialsignon.sinaweibo.provider.name=新浪微博
|
||||
#图片
|
||||
config.socialsignon.sinaweibo.icon=images/social/sinaweibo.png
|
||||
#新浪client.id
|
||||
config.socialsignon.sinaweibo.client.id=3379757634
|
||||
#新浪client.secret
|
||||
config.socialsignon.sinaweibo.client.secret=1adfdf9800299037bcab9d1c238664ba
|
||||
#
|
||||
config.socialsignon.sinaweibo.account.id=id
|
||||
#排序
|
||||
config.socialsignon.sinaweibo.sortorder=1
|
||||
</code></pre>
|
||||
|
||||
配置maxkey/spring/maxkey-support-social.xml
|
||||
|
||||
<pre><code class="xml hljs">
|
||||
<bean id="socialSignOnWeibo" class="org.maxkey.authn.support.socialsignon.service.SocialSignOnProvider">
|
||||
<property name="provider" value="${config.socialsignon.sinaweibo.provider}"/>
|
||||
<property name="providerName" value="${config.socialsignon.sinaweibo.provider.name}"/>
|
||||
<property name="icon" value="${config.socialsignon.sinaweibo.icon}"/>
|
||||
<property name="clientId" value="${config.socialsignon.sinaweibo.client.id}"/>
|
||||
<property name="clientSecret" value="${config.socialsignon.sinaweibo.client.secret}"/>
|
||||
<property name="sortOrder" value="${config.socialsignon.sinaweibo.sortorder}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="socialSignOnProviderService" class="org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService">
|
||||
<property name="socialSignOnProviders" >
|
||||
<list>
|
||||
<ref bean="socialSignOnWeibo" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
</code></pre>
|
||||
|
||||
<h3>账号绑定</h3>
|
||||
登录MaxKey,并绑定新浪微博账号
|
||||
|
||||
<img src="{{ "/images/authn/authn_s_4.png" | prepend: site.baseurl }}?{{ site.time | date: "%Y%m%d%H%M" }}" alt=""/>
|
||||
|
||||
<h3>登录测试</h3>
|
||||
|
||||
退出后,进入登录界面,点击新浪微博图标,跳转到新浪微博,输入用户名和密码后,直接登录MaxKey,即MaxKey信任了微博账号,
|
||||
|
||||
|
||||
<h3>第三方支持</h3>
|
||||
MaxKey使用第三方的登录认证库,认证支持的第三方,请见官方地址
|
||||
|
||||
https://docs.justauth.whnb.wang/#/
|
||||
BIN
docs/images/authn/authn_s_1.png
Normal file
BIN
docs/images/authn/authn_s_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
docs/images/authn/authn_s_2.png
Normal file
BIN
docs/images/authn/authn_s_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
BIN
docs/images/authn/authn_s_3.png
Normal file
BIN
docs/images/authn/authn_s_3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
BIN
docs/images/authn/authn_s_4.png
Normal file
BIN
docs/images/authn/authn_s_4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
Loading…
x
Reference in New Issue
Block a user