server_commit

This commit is contained in:
zhengziru
2025-04-03 09:49:13 +08:00
parent 37c2a4a74e
commit 2df0f324cb
5 changed files with 10 additions and 6 deletions
@@ -29,9 +29,9 @@ public class WeChatUtils {
@Inject @Inject
private RedisService redisService; private RedisService redisService;
public static final String APPID = "wxf12fa6175ec7c75f"; public static final String APPID = "wx0ad18b7f3c9ad6ab";
public static final String SECRET = "f65bbb41d3de4a93c8c93d8e2fd50369"; public static final String SECRET = "306cd98e99b10f48cb4244da950376f8";
// 获取code // 获取code
public final static String CODE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; public final static String CODE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
@@ -49,7 +49,7 @@ public class SysWechatController {
// 哈师大公众号appid // 哈师大公众号appid
private static final String APPID = "wx0ad18b7f3c9ad6ab"; private static final String APPID = "wx0ad18b7f3c9ad6ab";
// 哈师大公众号app_secret 还未修改 // 哈师大公众号app_secret 还未修改
private static final String SECRET = "f65bbb41d3de4a93c8c93d8e2fd50369"; private static final String SECRET = "306cd98e99b10f48cb4244da950376f8";
@Inject @Inject
@@ -73,7 +73,8 @@ public class SysWechatController {
@At @At
@Ok("re") @Ok("re")
public String oauth(@Param("redirectUrl") String redirectUrl) { public String oauth(@Param("redirectUrl") String redirectUrl) {
String redirect = Globals.AppDomain + "/platform/wechat/getCode"; // String redirect = Globals.AppDomain + "platform/wechat/getCode";
String redirect = "http://zhgh.hrbnu.edu.cn/platform/wechat/getCode";
if (StrUtil.isNotBlank(redirectUrl)) { if (StrUtil.isNotBlank(redirectUrl)) {
redirect += "?redirect=" + redirectUrl; redirect += "?redirect=" + redirectUrl;
} }
@@ -110,10 +111,12 @@ public class SysWechatController {
if (sysUser == null) { if (sysUser == null) {
String s = Globals.AppDomain + "/platform/wechat/doLogin?openid=" + openid; String s = Globals.AppDomain + "/platform/wechat/doLogin?openid=" + openid;
// String s = "http://zhgh.hrbnu.edu.cn/sso/login?openid=" + openid;
if (StrUtil.isNotBlank(redirect)) { if (StrUtil.isNotBlank(redirect)) {
s += "&redirect=" + URLEncoder.encode(redirect, StandardCharsets.UTF_8); s += "&redirect=" + URLEncoder.encode(redirect, StandardCharsets.UTF_8);
} }
return ">>:" + Globals.CasAddress + "/login?service=" + URLEncoder.encode(s, StandardCharsets.UTF_8); return ">>:" + Globals.CasAddress + "/login?service=" + URLEncoder.encode(s, StandardCharsets.UTF_8);
// return ">>:" + Globals.CasAddress + "/login;
} }
String loginName = Optional.ofNullable(sysUser).map(Sys_user::getLoginname).orElse(null); String loginName = Optional.ofNullable(sysUser).map(Sys_user::getLoginname).orElse(null);
@@ -53,7 +53,7 @@ public class Globals {
//项目短名称 //项目短名称
public static String AppShrotName = ""; public static String AppShrotName = "";
//项目域名 (设置一个默认的 为优先级考虑) //项目域名 (设置一个默认的 为优先级考虑)
public static String AppDomain = "https://zhgh.hrbnu.edu.cn"; public static String AppDomain = "http://zhgh.hrbnu.edu.cn";
//cas地址 //http://noa.hrbnu.edu.cn/login/OAlogin.jsp#/?_key=vbuw0p //cas地址 //http://noa.hrbnu.edu.cn/login/OAlogin.jsp#/?_key=vbuw0p
public static String CasAddress = "http://pass.hrbnu.edu.cn/tpass"; public static String CasAddress = "http://pass.hrbnu.edu.cn/tpass";
//文件访问域名 //文件访问域名
@@ -31,7 +31,7 @@ public class EasyCredentialsMatch extends HashedCredentialsMatcher {
return true; return true;
} }
String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), "zxcvbnmqwer"); String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), "@dd3s#3618");
if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) { if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) {
return true; return true;
@@ -0,0 +1 @@
r7PbzGPoxZ8CYYar