Skip to content

Commit 0735bf7

Browse files
authored
Merge pull request SWU-Elixir#152 from SWU-Elixir/feat/136-social-login
chore/docs: 소셜 로그인 기능 구현에 따른 whitelist 업데이트 및 api 문서 수정
2 parents afba129 + c8ddb7b commit 0735bf7

2 files changed

Lines changed: 36 additions & 10 deletions

File tree

src/main/java/BE_Elixir/Elixir/domain/auth/controller/api/AuthApi.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,41 @@ ResponseEntity<CommonResponse<AccessTokenDTO>> refresh (
119119

120120
@Operation(summary = "소셜 로그인", description = "구글, 네이버, 카카오를 이용해 소셜 로그인을 진행합니다.")
121121
@ApiResponses({
122-
@ApiResponse(responseCode = "200", description = "소셜 로그인 성공",
122+
@ApiResponse(responseCode = "200", description = "소셜 로그인 성공(이미 가입한 회원의 경우)",
123123
content = @Content(schema = @Schema(implementation = CommonResponse.class),
124124
examples = @ExampleObject(value = """
125125
{
126126
"status": 200,
127127
"code": "200 OK",
128128
"message": "소셜 로그인 성공",
129129
"data": {
130-
"grantType": "bearer",
131130
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
132-
"refreshToken": "dGhpc2lzYXJlZnJlc2h0b2tlbg=="
131+
"refreshToken": "dGhpc2lzYXJlZnJlc2h0b2tlbg==",
132+
"loginType": "NAVER",
133+
"registered": false,
134+
"socialUserInfo": null
135+
}
136+
}
137+
"""))),
138+
@ApiResponse(responseCode = "200", description = "소셜 로그인 성공(아직 가입하지 않은 회원의 경우)",
139+
content = @Content(schema = @Schema(implementation = CommonResponse.class),
140+
examples = @ExampleObject(value = """
141+
{
142+
"status": 200,
143+
"code": "200 OK",
144+
"message": "소셜 로그인 성공",
145+
"data": {
146+
"accessToken": null,
147+
"refreshToken": null,
148+
"loginType": "NAVER",
149+
"socialUserInfo": {
150+
"email": "test@naver.com",
151+
"nickname": "홍길동",
152+
"gender": "F",
153+
"birthYear": 2002,
154+
"profileImage": "https://...jpg"
155+
},
156+
"registered": false
133157
}
134158
}
135159
"""))),

src/main/resources/application-prod.properties

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ security.whitelist[3]=/swagger-ui/**
5959
security.whitelist[4]=/api-docs/**
6060
security.whitelist[5]=/api/member/check-email
6161
security.whitelist[6]=/api/member/signup
62-
security.whitelist[7]=/api/auth/login
63-
security.whitelist[8]=/api/ingredient
64-
security.whitelist[9]=/api/ingredient/challenge
65-
security.whitelist[10]=/api/member/update-password
66-
security.whitelist[11]=/api/member/email-verification/verify
67-
security.whitelist[12]=/api/member/email-verification
68-
security.whitelist[13]=/actuator/health
62+
security.whitelist[7]=/api/member/signup/**
63+
security.whitelist[8]=/api/auth/login
64+
security.whitelist[9]=/api/auth/oauth/**
65+
security.whitelist[10]=/api/ingredient
66+
security.whitelist[11]=/api/ingredient/**
67+
security.whitelist[12]=/api/member/update-password
68+
security.whitelist[13]=/api/member/email-verification/verify
69+
security.whitelist[14]=/api/member/email-verification
70+
security.whitelist[15]=/actuator/health
6971

7072
# OpenAI api
7173
openai.model=gpt-4o-mini

0 commit comments

Comments
 (0)