Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
shr-server
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
inroi
shr-server
Commits
99bff38f
提交
99bff38f
authored
7月 21, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
86a92616
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
14 行删除
+19
-14
pom.xml
pom.xml
+8
-6
EasController.java
src/main/java/com/shr/controller/EasController.java
+7
-4
VerifyTicketServlet.java
src/main/java/com/shr/filter/VerifyTicketServlet.java
+1
-1
application-docker.yml
src/main/resources/application-docker.yml
+3
-3
没有找到文件。
pom.xml
浏览文件 @
99bff38f
...
@@ -174,7 +174,6 @@
...
@@ -174,7 +174,6 @@
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.1
</version>
<configuration>
<configuration>
<source>
${java.version}
</source>
<source>
${java.version}
</source>
<target>
${java.version}
</target>
<target>
${java.version}
</target>
...
@@ -185,14 +184,17 @@
...
@@ -185,14 +184,17 @@
<plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
<configuration>
<configuration>
<
fork>
true
</fork
>
<
includeSystemScope>
true
</includeSystemScope
>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
</plugin>
</plugins>
</plugins>
<resources>
<resources>
<resource>
<resource>
...
...
src/main/java/com/shr/controller/EasController.java
浏览文件 @
99bff38f
...
@@ -36,7 +36,7 @@ public class EasController {
...
@@ -36,7 +36,7 @@ public class EasController {
System
.
out
.
println
(
"password: "
+
password
);
System
.
out
.
println
(
"password: "
+
password
);
//生成EAS单点登录地址
//生成EAS单点登录地址
String
url
=
"http://1
92.168.2.219:6888
/portal/index2sso.jsp?username="
+
ssoUsername
+
"&password="
+
password
+
"&redirectTo="
+
redirectTo
+
"&isNotCheckRelogin=true"
;
String
url
=
"http://1
72.16.1.72:8090
/portal/index2sso.jsp?username="
+
ssoUsername
+
"&password="
+
password
+
"&redirectTo="
+
redirectTo
+
"&isNotCheckRelogin=true"
;
//验证Token
//验证Token
LtpaTokenManager
.
isValid
(
password
);
LtpaTokenManager
.
isValid
(
password
);
System
.
out
.
println
(
url
);
System
.
out
.
println
(
url
);
...
@@ -51,13 +51,16 @@ public class EasController {
...
@@ -51,13 +51,16 @@ public class EasController {
String
redirectTo
=
URLEncoder
.
encode
(
shrLocal
);
String
redirectTo
=
URLEncoder
.
encode
(
shrLocal
);
//登陆用户名
//登陆用户名
String
username
=
"user"
;
String
ssoUsername
=
ThreadLocalConfig
.
get
().
get
(
"ssoUsername"
).
toString
();
if
(
StringUtil
.
isBlank
(
ssoUsername
))
{
return
;
}
//根据密钥生成的密码串
//根据密钥生成的密码串
String
password
=
LtpaTokenManager
.
generate
(
u
sername
,
LtpaTokenManager
.
getDefaultLtpaConfig
(),
"OTP"
).
toString
();
String
password
=
LtpaTokenManager
.
generate
(
ssoU
sername
,
LtpaTokenManager
.
getDefaultLtpaConfig
(),
"OTP"
).
toString
();
System
.
out
.
println
(
"password: "
+
password
);
System
.
out
.
println
(
"password: "
+
password
);
//生成SHR单点登录地址
//生成SHR单点登录地址
String
url
=
"http://1
92.168.2.219:6888/shr/OTP2sso.jsp?username="
+
u
sername
+
"&password="
+
password
+
"&redirectTo="
+
redirectTo
+
"&userAuthPattern=OTP&isNotCheckRelogin=true"
;
String
url
=
"http://1
72.16.1.72:8090/shr/OTP2sso.jsp?username="
+
ssoU
sername
+
"&password="
+
password
+
"&redirectTo="
+
redirectTo
+
"&userAuthPattern=OTP&isNotCheckRelogin=true"
;
//验证Token
//验证Token
LtpaTokenManager
.
isValid
(
password
);
LtpaTokenManager
.
isValid
(
password
);
System
.
out
.
println
(
url
);
System
.
out
.
println
(
url
);
...
...
src/main/java/com/shr/filter/VerifyTicketServlet.java
浏览文件 @
99bff38f
...
@@ -33,7 +33,7 @@ public class VerifyTicketServlet extends HttpServlet {
...
@@ -33,7 +33,7 @@ public class VerifyTicketServlet extends HttpServlet {
}
}
// 认证服务器地址
// 认证服务器地址
String
authServerIp
=
"10.
3.40.239
"
;
String
authServerIp
=
"10.
10.12.1:80
"
;
// 认证服务器端口
// 认证服务器端口
String
authServerPort
=
"80"
;
String
authServerPort
=
"80"
;
...
...
src/main/resources/application-docker.yml
浏览文件 @
99bff38f
...
@@ -20,9 +20,9 @@ spring:
...
@@ -20,9 +20,9 @@ spring:
max-file-size
:
100MB
max-file-size
:
100MB
datasource
:
datasource
:
url
:
jdbc:mysql://
shr-mysql
:3306/shr_server?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
url
:
jdbc:mysql://
127.0.0.1
:3306/shr_server?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=CTT&allowPublicKeyRetrieval=true
username
:
root
username
:
inori
password
:
gf^*i6%&9J83&(*kJ653F&L
password
:
123456
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
mybatis-plus
:
mybatis-plus
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论