diff --git a/docs/_includes/navigation.html b/docs/_includes/navigation.html index de047040a3860743a10d8479248ea06bed2a2730..0a3b8d0a14ee0b99d93afc7b72379e13492eb92d 100644 --- a/docs/_includes/navigation.html +++ b/docs/_includes/navigation.html @@ -17,6 +17,7 @@ 登录集成
+<!--
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.TimeBasedOtpAuthn">
+</bean>
+-->
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.sms.SmsOtpAuthnTencentCloud">
+ <property name="secretId" value="94395d754eb55693043f5d6a2b772ef4" />
+ <property name="secretKey" value="05d5485357bc" />
+ <property name="smsSdkAppid" value="1486220095" />
+ <property name="templateId" value="14860095" />
+ <property name="sign" value="1486009522" />
+</bean>
+
+
+
+
+<!--
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.TimeBasedOtpAuthn">
+</bean>
+-->
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.sms.SmsOtpAuthnAliyun">
+ <property name="accessKeyId" value="94395d754eb55693043f5d6a2b772ef3" />
+ <property name="accessSecret" value="05d5485357bc" />
+ <property name="templateCode" value="SMS_187590021" />
+ <property name="signName" value="MaxKey" />
+</bean>
+
+
+
+
+<!--
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.TimeBasedOtpAuthn">
+</bean>
+-->
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.sms.SmsOtpAuthnYunxin">
+ <property name="appKey" value="94395d754eb55693043f5d6a2b772ef4" />
+ <property name="appSecret" value="05d5485357bc" />
+ <property name="templateId" value="14860095" />
+</bean>
+
+
+
+
+# EMAIL configuration
+config.email.username=maxkey@163.com
+config.email.password=password
+config.email.smtpHost=smtp.163.com
+config.email.port=465
+config.email.senderMail=maxkey@163.com
+config.email.ssl=true
+
+
+配置maxkey中spring/maxkey-security.xml
+
+subject 邮件主题
+
+messageTemplate 邮件内容模板,请勿修改参数{0}为用户名,{1}认证码,{2}有效间隔
+
+
+<!--
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.TimeBasedOtpAuthn">
+</bean>
+-->
+<bean id="tfaOptAuthn" class="org.maxkey.crypto.password.opt.impl.MailOtpAuthn">
+ <property name="subject" value="MaxKey One Time PassWord" />
+ <property name="messageTemplate" value="{0} You Token is {1} , it validity in {2} minutes." />
+</bean>
+
\ No newline at end of file
diff --git a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnAliyun.java b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnAliyun.java
similarity index 98%
rename from maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnAliyun.java
rename to maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnAliyun.java
index f6b48b868d8da8ce17dee78fe933638aea4db450..cb168fbe29c339edde047bf65b9e1312f06a691a 100644
--- a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnAliyun.java
+++ b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnAliyun.java
@@ -1,4 +1,4 @@
-package org.maxkey.crypto.password.opt.impl.sms.netease;
+package org.maxkey.crypto.password.opt.impl.sms;
import com.aliyuncs.CommonRequest;
import com.aliyuncs.CommonResponse;
diff --git a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnTencentCloud.java b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnTencentCloud.java
similarity index 98%
rename from maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnTencentCloud.java
rename to maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnTencentCloud.java
index 37861c3359a4ee86b9eab0b97f1accd454fba460..36bf9775053cf915420f8a4c7c428cf90a84f287 100644
--- a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnTencentCloud.java
+++ b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnTencentCloud.java
@@ -1,4 +1,4 @@
-package org.maxkey.crypto.password.opt.impl.sms.netease;
+package org.maxkey.crypto.password.opt.impl.sms;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
diff --git a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnYunxin.java b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnYunxin.java
similarity index 99%
rename from maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnYunxin.java
rename to maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnYunxin.java
index a422a4373e6e960fa2bfc0f36e7e6e241c6d2df9..a01f7c2544e133bcd00242d468e2708b5cf03daa 100644
--- a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnYunxin.java
+++ b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnYunxin.java
@@ -1,4 +1,4 @@
-package org.maxkey.crypto.password.opt.impl.sms.netease;
+package org.maxkey.crypto.password.opt.impl.sms;
import java.util.ArrayList;
import java.util.Date;
diff --git a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnYunxinCheckSumBuilder.java b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnYunxinCheckSumBuilder.java
similarity index 95%
rename from maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnYunxinCheckSumBuilder.java
rename to maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnYunxinCheckSumBuilder.java
index 83d306d9f1ce481e933a405f0e0f295795a3c761..f5a5b4b925274abc898ca8f8bc0561b8a32fe9f8 100644
--- a/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/netease/SmsOtpAuthnYunxinCheckSumBuilder.java
+++ b/maxkey-core/src/main/java/org/maxkey/crypto/password/opt/impl/sms/SmsOtpAuthnYunxinCheckSumBuilder.java
@@ -1,4 +1,4 @@
-package org.maxkey.crypto.password.opt.impl.sms.netease;
+package org.maxkey.crypto.password.opt.impl.sms;
import java.security.MessageDigest;
diff --git a/maxkey-web-maxkey/src/main/resources/spring/maxkey-security.xml b/maxkey-web-maxkey/src/main/resources/spring/maxkey-security.xml
index e98d886ec1045ee72ee1a2da3e565d38f5cce7be..6ca8f200d84dedcc16657bf7949e787d73cf5f2e 100644
--- a/maxkey-web-maxkey/src/main/resources/spring/maxkey-security.xml
+++ b/maxkey-web-maxkey/src/main/resources/spring/maxkey-security.xml
@@ -87,7 +87,7 @@