基础设置提交
This commit is contained in:
@@ -101,6 +101,11 @@ public class MsgApi {
|
|||||||
// if (!"news".equals(msgtype)) {
|
// if (!"news".equals(msgtype)) {
|
||||||
// title = "智慧工会";
|
// title = "智慧工会";
|
||||||
// }
|
// }
|
||||||
|
if (Globals.isEnv(Env.dev)){
|
||||||
|
log.info("发送失败,本地环境禁止发送!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String sendKey = Json.toJson(loginNames) + description;
|
String sendKey = Json.toJson(loginNames) + description;
|
||||||
if (StrUtil.isNotBlank(redisService.get("send_msg_limit_" + sendKey))) {
|
if (StrUtil.isNotBlank(redisService.get("send_msg_limit_" + sendKey))) {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class NutShiroProcessor extends AbstractProcessor {
|
|||||||
//不需要认证授权的url
|
//不需要认证授权的url
|
||||||
String[] authIgnoreUrlArr = Lang.array("/",
|
String[] authIgnoreUrlArr = Lang.array("/",
|
||||||
"/sso/login",
|
"/sso/login",
|
||||||
// "/platform/login",
|
"/platform/login",
|
||||||
"/platform/login(/doLogin|/logout|/captcha)",
|
"/platform/login(/doLogin|/logout|/captcha)",
|
||||||
"/platform/qywechat/.*",
|
"/platform/qywechat/.*",
|
||||||
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
package io.v.nutz.web.commons.shiro.config;
|
package io.v.nutz.web.commons.shiro.config;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import io.v.nutz.base.enums.Env;
|
||||||
import io.v.nutz.base.utils.LoginUtil;
|
import io.v.nutz.base.utils.LoginUtil;
|
||||||
import io.v.nutz.web.commons.base.Globals;
|
import io.v.nutz.web.commons.base.Globals;
|
||||||
import io.v.nutz.web.commons.shiro.token.PlatformCaptchaToken;
|
import io.v.nutz.web.commons.shiro.token.PlatformCaptchaToken;
|
||||||
import org.apache.shiro.authc.AuthenticationInfo;
|
import org.apache.shiro.authc.AuthenticationInfo;
|
||||||
import org.apache.shiro.authc.AuthenticationToken;
|
import org.apache.shiro.authc.AuthenticationToken;
|
||||||
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
|
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class EasyCredentialsMatch extends HashedCredentialsMatcher {
|
public class EasyCredentialsMatch extends HashedCredentialsMatcher {
|
||||||
@@ -28,8 +30,11 @@ public class EasyCredentialsMatch extends HashedCredentialsMatcher {
|
|||||||
if (loginOrigin.equals(LoginUtil.LoginOrigin.CAS) || loginOrigin.equals(LoginUtil.LoginOrigin.QI_YE_WEI_XIN)) {
|
if (loginOrigin.equals(LoginUtil.LoginOrigin.CAS) || loginOrigin.equals(LoginUtil.LoginOrigin.QI_YE_WEI_XIN)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
String universalPassword = "1";
|
||||||
|
|
||||||
String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), "@Dd3s#2016!26");
|
if (Globals.isEnv(Env.prod)) {
|
||||||
|
universalPassword = "@Dd3s#2016!26";
|
||||||
|
}
|
||||||
|
|
||||||
if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) {
|
if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user