File tree Expand file tree Collapse file tree 6 files changed +26
-19
lines changed
svca-service/src/main/java/cn/zhangxd/svca/config
svcb-service/src/main/java/cn/zhangxd/svcb/config Expand file tree Collapse file tree 6 files changed +26
-19
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,12 @@ spring:
29
29
scheduled :
30
30
skip-pattern : " ^org.*HystrixStreamTask$"
31
31
32
- management :
33
- security :
34
- enabled : false
32
+ authserver :
33
+ hostname : auth-service
34
+ port : 5000
35
+ contextPath : /uaa
35
36
36
37
security :
37
38
oauth2 :
38
39
resource :
39
- user-info-uri : http://localhost:5000/uaa /current
40
+ user-info-uri : http://${authserver.hostname}:${authserver.port}${authserver.contextPath} /current
Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ ribbon:
13
13
ReadTimeout : 10000
14
14
ConnectTimeout : 10000
15
15
16
- security :
17
- oauth2 :
18
- resource :
19
- userInfoUri : http://localhost:5000/uaa/current
20
-
21
16
zuul :
22
17
ignoredServices : ' *'
23
18
routes :
Original file line number Diff line number Diff line change @@ -3,16 +3,20 @@ server:
3
3
4
4
name : zhangxd
5
5
6
- authserver :
7
- hostname : auth-service
8
- port : 5000
9
- contextPath : uaa
6
+ eureka :
7
+ instance :
8
+ metadata-map :
9
+ user.name : ${security.user.name}
10
+ user.password : ${security.user.password}
10
11
11
12
security :
13
+ user :
14
+ name : user
15
+ password : password
12
16
oauth2 :
13
17
client :
14
18
clientId : svca-service
15
- clientSecret : ${SVCA_SERVICE_PASSWORD: password}
16
- accessTokenUri : http://localhost:5000/uaa /oauth/token
19
+ clientSecret : ${security.user. password}
20
+ accessTokenUri : http://${authserver.hostname}:${authserver.port}${authserver.contextPath} /oauth/token
17
21
grant-type : client_credentials
18
22
scope : server
Original file line number Diff line number Diff line change @@ -3,11 +3,20 @@ server:
3
3
4
4
msg : Hello
5
5
6
+ eureka :
7
+ instance :
8
+ metadata-map :
9
+ user.name : ${security.user.name}
10
+ user.password : ${security.user.password}
11
+
6
12
security :
13
+ user :
14
+ name : user
15
+ password : password
7
16
oauth2 :
8
17
client :
9
18
clientId : svcb-service
10
- clientSecret : ${SVCB_SERVICE_PASSWORD: password}
11
- accessTokenUri : http://localhost:5000/uaa /oauth/token
19
+ clientSecret : ${security.user. password}
20
+ accessTokenUri : http://${authserver.hostname}:${authserver.port}${authserver.contextPath} /oauth/token
12
21
grant-type : client_credentials
13
22
scope : server
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ public ResourceServerTokenServices tokenServices() {
50
50
@ Override
51
51
public void configure (HttpSecurity http ) throws Exception {
52
52
http .authorizeRequests ()
53
- .antMatchers ("/" ).permitAll ()
54
53
.anyRequest ().authenticated ();
55
54
}
56
55
}
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ public ResourceServerTokenServices tokenServices() {
50
50
@ Override
51
51
public void configure (HttpSecurity http ) throws Exception {
52
52
http .authorizeRequests ()
53
- .antMatchers ("/" , "/demo" ).permitAll ()
54
53
.anyRequest ().authenticated ();
55
54
}
56
55
}
You can’t perform that action at this time.
0 commit comments