Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whatyn
microservices-platform
提交
177d8ec0
microservices-platform
项目概览
whatyn
/
microservices-platform
与 Fork 源项目一致
Fork自
zlt2000 / microservices-platform
通知
4
Star
1
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
microservices-platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
177d8ec0
编写于
7月 27, 2019
作者:
zlt2000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化授权认证配置,授权服务器关闭basic认证
上级
ff2b1953
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
18 deletion
+7
-18
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/properties/PermitProperties.java
...om/central/oauth2/common/properties/PermitProperties.java
+0
-1
zlt-gateway/zuul-gateway/src/main/resources/application.yml
zlt-gateway/zuul-gateway/src/main/resources/application.yml
+5
-5
zlt-uaa/src/main/java/com/central/oauth/config/SecurityConfig.java
...rc/main/java/com/central/oauth/config/SecurityConfig.java
+2
-2
zlt-uaa/src/main/resources/application.yml
zlt-uaa/src/main/resources/application.yml
+0
-10
未找到文件。
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/properties/PermitProperties.java
浏览文件 @
177d8ec0
...
...
@@ -18,7 +18,6 @@ public class PermitProperties {
* 监控中心和swagger需要访问的url
*/
private
static
final
String
[]
ENDPOINTS
=
{
"/oauth/**"
,
"/actuator/**"
,
"/*/v2/api-docs"
,
"/swagger/api-docs"
,
...
...
zlt-gateway/zuul-gateway/src/main/resources/application.yml
浏览文件 @
177d8ec0
...
...
@@ -34,17 +34,17 @@ zlt:
ignore
:
# 忽略认证的地址
httpUrls
:
>
/api-uaa/**,
/api-uaa/oauth/**,
/api-uaa/validata/**,
/api-uaa/css/**,
/api-uaa/images/**,
/api-uaa/js/**,
/api-user/users-anon/**,
/login.html,
/user/login
# 配置只认证登录,登录后所有角色都能访问的url
menusPaths
:
/api-user/menus/current
auth
:
# 配置必需认证的url
httpUrls
:
>
/api-uaa/clients/**,
/api-uaa/tokens/**
#是否开启url级别权限
urlEnabled
:
false
renew
:
...
...
zlt-uaa/src/main/java/com/central/oauth/config/SecurityConfig.java
浏览文件 @
177d8ec0
...
...
@@ -78,9 +78,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
()
.
antMatchers
(
securityProperties
.
getIgnore
().
getUrls
())
.
anyRequest
()
//授权服务器关闭basic认证
.
permitAll
()
.
anyRequest
().
authenticated
()
.
and
()
.
formLogin
()
.
loginPage
(
SecurityConstants
.
LOGIN_PAGE
)
...
...
zlt-uaa/src/main/resources/application.yml
浏览文件 @
177d8ec0
...
...
@@ -25,16 +25,6 @@ zlt:
version
:
1.0
base-package
:
com.central.oauth.controller
security
:
ignore
:
# 忽略认证的地址
httpUrls
:
>
/validata/**,
/clients/**,
/tokens/**,
/login.html,
/css/**,
/images/**,
/js/**
code
:
# 忽略验证码的应用编号
ignoreClientCode
:
app
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录