Skip to content

Commit 16f074b

Browse files
authored
Merge pull request #2 from FlipNoteTeam/feat/auth-svc-route
Feat: Auth svc route 추가
2 parents 03694dc + 77c5db2 commit 16f074b

2 files changed

Lines changed: 65 additions & 11 deletions

File tree

src/main/resources/application-local.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,41 @@ spring:
22
cloud:
33
gateway:
44
routes:
5-
- id: user-service-public
5+
- id: user-private
66
uri: http://localhost:8081
77
predicates:
8-
- Path=/v1/users/signup, /v1/users/login
8+
- Path=/v1/users/**
9+
filters:
10+
- AuthenticationFilter
911

10-
- id: user-service-private
12+
- id: auth-public
1113
uri: http://localhost:8081
1214
predicates:
13-
- Path=/v1/users/**
15+
- name: Path
16+
args:
17+
patterns:
18+
- /v1/auth/login
19+
- /v1/auth/register
20+
- /v1/auth/token/refresh
21+
- /v1/auth/email-verification/request
22+
- /v1/auth/email-verification
23+
- /v1/auth/password-reset/request
24+
- /v1/auth/password-reset
25+
- /v1/oauth2/callback/*
26+
27+
- id: auth-private
28+
uri: http://localhost:8081
29+
predicates:
30+
- name: Path
31+
args:
32+
patterns:
33+
- /v1/auth/logout
34+
- /v1/auth/password
35+
- /v1/auth/social-links
36+
- /v1/auth/social-links/*
37+
- /v1/oauth2/authorization/*
1438
filters:
1539
- AuthenticationFilter
40+
41+
jwt:
42+
secret: "55ca298dcfc216e215622e3f48a251abaa4e8bb973074f065ab170e311acc15811d01a2407290c3ac143648196306d4a6f666a4ed364d3df633e08eb184bb0aea0f2edde4fd2d7fa68ea95ddbc421ff532ce47bde775975911042d665bc22d88a9fa26a03bb4d25530b8cdeb1247d87c9e3efcd721e368b0566b00a43308a729"

src/main/resources/application.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,49 @@ spring:
77

88
cloud:
99
gateway:
10+
default-filters:
11+
- RemoveRequestHeader=X-User-Id
12+
- RemoveRequestHeader=X-User-Email
13+
- RemoveRequestHeader=X-User-Role
1014
routes:
11-
- id: user-service-public
15+
- id: user-private
1216
uri: http://user-service:8081
1317
predicates:
14-
- Path=/v1/users/signup, /v1/users/login
18+
- Path=/v1/users/**
19+
filters:
20+
- AuthenticationFilter
1521

16-
- id: user-service-private
22+
- id: auth-public
1723
uri: http://user-service:8081
1824
predicates:
19-
- Path=/v1/users/**
25+
- name: Path
26+
args:
27+
patterns:
28+
- /v1/auth/login
29+
- /v1/auth/register
30+
- /v1/auth/token/refresh
31+
- /v1/auth/email-verification/request
32+
- /v1/auth/email-verification
33+
- /v1/auth/password-reset/request
34+
- /v1/auth/password-reset
35+
- /v1/oauth2/callback/*
36+
37+
- id: auth-private
38+
uri: http://user-service:8081
39+
predicates:
40+
- name: Path
41+
args:
42+
patterns:
43+
- /v1/auth/logout
44+
- /v1/auth/password
45+
- /v1/auth/social-links
46+
- /v1/auth/social-links/*
47+
- /v1/oauth2/authorization/*
2048
filters:
2149
- AuthenticationFilter
2250

2351
jwt:
24-
secret: ${JWT_SECRET:"55ca298dcfc216e215622e3f48a251abaa4e8bb973074f065ab170e311acc15811d01a2407290c3ac143648196306d4a6f666a4ed364d3df633e08eb184bb0aea0f2edde4fd2d7fa68ea95ddbc421ff532ce47bde775975911042d665bc22d88a9fa26a03bb4d25530b8cdeb1247d87c9e3efcd721e368b0566b00a43308a729"}
52+
secret: ${JWT_SECRET}
2553

2654
management:
2755
endpoints:
@@ -31,5 +59,4 @@ management:
3159

3260
logging:
3361
level:
34-
org.springframework.cloud.gateway: DEBUG
35-
flipnote.apigateway: DEBUG
62+
flipnote.apigateway: INFO

0 commit comments

Comments
 (0)