Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
a39f01e4
提交
a39f01e4
编写于
5月 06, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
58c2a00b
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
20 行增加
和
6 行删除
+20
-6
config.xml
config.xml
+5
-0
webSecurityConfig.java
...rc/main/java/cn/ibizlab/web/config/webSecurityConfig.java
+2
-0
application-dev.yml
ibzuaa-boot/src/main/resources/application-dev.yml
+1
-1
Dockerfile
...a-provider/ibzuaa-provider-api/src/main/docker/Dockerfile
+1
-1
ibzuaa-provider-api.yaml
...uaa-provider-api/src/main/docker/ibzuaa-provider-api.yaml
+3
-1
apiSecurityConfig.java
...rc/main/java/cn/ibizlab/api/config/apiSecurityConfig.java
+2
-0
application-api-dev.yml
...a-provider-api/src/main/resources/application-api-dev.yml
+1
-1
application-api-prod.yml
...-provider-api/src/main/resources/application-api-prod.yml
+1
-1
AuthenticationController.java
...n/java/cn/ibizlab/util/rest/AuthenticationController.java
+2
-0
AuthorizationTokenFilter.java
...va/cn/ibizlab/util/security/AuthorizationTokenFilter.java
+2
-1
未找到文件。
config.xml
浏览文件 @
a39f01e4
...
...
@@ -38,6 +38,11 @@
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Papi
cd ibzuaa-provider/ibzuaa-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-provider-api.yaml dev --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzuaa-app/ibzuaa-app-web/src/main/java/cn/ibizlab/web/config/webSecurityConfig.java
浏览文件 @
a39f01e4
...
...
@@ -20,6 +20,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.beans.factory.annotation.Qualifier
;
@Profile
(
"web-prod"
)
@Configuration
...
...
@@ -30,6 +31,7 @@ public class webSecurityConfig extends WebSecurityConfigurerAdapter {
private
AuthenticationEntryPoint
unauthorizedHandler
;
@Autowired
@Qualifier
(
"IBZUAAUserService"
)
private
AuthenticationUserService
userDetailsService
;
/**
...
...
ibzuaa-boot/src/main/resources/application-dev.yml
浏览文件 @
a39f01e4
server
:
port
:
8080
port
:
40002
ibzuaa-provider/ibzuaa-provider-api/src/main/docker/Dockerfile
浏览文件 @
a39f01e4
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-provider-api.jar
EXPOSE
8081
EXPOSE
40002
ADD
ibzuaa-provider-api.jar /ibzuaa-provider-api.jar
ibzuaa-provider/ibzuaa-provider-api/src/main/docker/ibzuaa-provider-api.yaml
浏览文件 @
a39f01e4
...
...
@@ -3,9 +3,11 @@ services:
ibzuaa-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest
ports
:
-
"
8081:8081
"
-
"
40002:40002
"
networks
:
-
agent_network
environment
:
SPRING_CLOUD_NACOS_DISCOVERY_IP
:
172.16.180.237
deploy
:
mode
:
replicated
replicas
:
1
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/config/apiSecurityConfig.java
浏览文件 @
a39f01e4
...
...
@@ -20,6 +20,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.beans.factory.annotation.Qualifier
;
@Profile
(
"api-prod"
)
@Configuration
...
...
@@ -30,6 +31,7 @@ public class apiSecurityConfig extends WebSecurityConfigurerAdapter {
private
AuthenticationEntryPoint
unauthorizedHandler
;
@Autowired
@Qualifier
(
"IBZUAAUserService"
)
private
AuthenticationUserService
userDetailsService
;
/**
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/resources/application-api-dev.yml
浏览文件 @
a39f01e4
server
:
port
:
8081
\ No newline at end of file
port
:
40002
\ No newline at end of file
ibzuaa-provider/ibzuaa-provider-api/src/main/resources/application-api-prod.yml
浏览文件 @
a39f01e4
server
:
port
:
8081
port
:
40002
ibzuaa-util/src/main/java/cn/ibizlab/util/rest/AuthenticationController.java
浏览文件 @
a39f01e4
...
...
@@ -14,6 +14,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.beans.factory.annotation.Qualifier
;
@RestController
@RequestMapping
(
"/"
)
...
...
@@ -27,6 +28,7 @@ public class AuthenticationController
private
AuthTokenUtil
jwtTokenUtil
;
@Autowired
@Qualifier
(
"IBZUAAUserService"
)
private
AuthenticationUserService
userDetailsService
;
@PostMapping
(
value
=
"${ibiz.auth.path:v7/login}"
)
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthorizationTokenFilter.java
浏览文件 @
a39f01e4
...
...
@@ -11,6 +11,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
import
org.springframework.security.web.authentication.WebAuthenticationDetailsSource
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.filter.OncePerRequestFilter
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
javax.servlet.FilterChain
;
import
javax.servlet.ServletException
;
...
...
@@ -26,7 +27,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
private
final
AuthTokenUtil
authTokenUtil
;
private
final
String
tokenHeader
;
public
AuthorizationTokenFilter
(
AuthenticationUserService
userDetailsService
,
AuthTokenUtil
authTokenUtil
,
@Value
(
"${ibiz.jwt.header:Authorization}"
)
String
tokenHeader
)
{
public
AuthorizationTokenFilter
(
@Qualifier
(
"IBZUAAUserService"
)
AuthenticationUserService
userDetailsService
,
AuthTokenUtil
authTokenUtil
,
@Value
(
"${ibiz.jwt.header:Authorization}"
)
String
tokenHeader
)
{
this
.
userDetailsService
=
userDetailsService
;
this
.
authTokenUtil
=
authTokenUtil
;
this
.
tokenHeader
=
tokenHeader
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录