优化授权认证配置,授权服务器关闭basic认证
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user