Skip to content

Commit

Permalink
๐Ÿ› oauth2 ๋ฆฌ๋‹ค์ด๋ ‰์…˜ ์„ค์ •
Browse files Browse the repository at this point in the history
- url ๋ถˆ์ผ์น˜ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.
  • Loading branch information
Ganghee-Lee-0522 committed Jan 12, 2024
1 parent facd638 commit 7b7ceab
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
)
// OAuth 2.0 ๋กœ๊ทธ์ธ ์„ค์ • ์‹œ์ž‘
.oauth2Login( (oauth2Login) -> oauth2Login
.authorizationEndpoint(authorization -> authorization // ์ธ์ฆ ์—”๋“œํฌ์ธํŠธ ์„ค์ •
.baseUri("/login/oauth2/code") // ์‚ฌ์šฉ์ž๊ฐ€ ๋กœ๊ทธ์ธํ•˜๋ ค๊ณ  ํ•  ๋•Œ ๋ฆฌ๋‹ค์ด๋ ‰์…˜๋˜๋Š” ๊ธฐ๋ณธ URI

) // ์ปค์Šคํ…€ ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ, ๋กœ๊ทธ์ธ ์‹œ ๋ฆฌ๋‹ค์ด๋ ‰์…˜์ด ํ•„์š”์—†๋‹ค.
// .authorizationEndpoint(authorization -> authorization // ์ธ์ฆ ์—”๋“œํฌ์ธํŠธ ์„ค์ •
//// .baseUri("/login/oauth2/code") // ์‚ฌ์šฉ์ž๊ฐ€ ๋กœ๊ทธ์ธํ•˜๋ ค๊ณ  ํ•  ๋•Œ ๋ฆฌ๋‹ค์ด๋ ‰์…˜๋˜๋Š” ๊ธฐ๋ณธ URI
////
//// ) // ์ปค์Šคํ…€ ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ, ๋กœ๊ทธ์ธ ์‹œ ๋ฆฌ๋‹ค์ด๋ ‰์…˜์ด ํ•„์š”์—†๋‹ค.
.redirectionEndpoint( redirection -> redirection
.baseUri("/login/oauth2/code") // OAuth 2.0 ๊ณต๊ธ‰์ž๋กœ๋ถ€ํ„ฐ ์ฝ”๋“œ๊ฐ€ ๋ฆฌ๋‹ค์ด๋ ‰์…˜๋  ๋•Œ์˜ ๊ธฐ๋ณธ URI
.baseUri("/login/oauth2/code/github") // OAuth 2.0 ๊ณต๊ธ‰์ž๋กœ๋ถ€ํ„ฐ ์ฝ”๋“œ๊ฐ€ ๋ฆฌ๋‹ค์ด๋ ‰์…˜๋  ๋•Œ์˜ ๊ธฐ๋ณธ URI
//
) // ๋ฆฌ๋‹ค์ด๋ ‰์…˜ ์—”๋“œํฌ์ธํŠธ ์„ค์ •
.successHandler(successHandler) // OAuth 2.0 ๋กœ๊ทธ์ธ ์„ฑ๊ณต ์‹œ์˜ ํ•ธ๋“ค๋Ÿฌ๋ฅผ ์„ค์ •
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "https://kidari.site")
@RequestMapping("/api/v1")
public class AttackController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "https://kidari.site")
@RequestMapping("/api/v1")
public class FollowController {
private final FollowService followService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "https://kidari.site")
@RequestMapping("/api/v1/item")
public class ItemController {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@RequiredArgsConstructor
@RestController
@CrossOrigin(origins = "https://kidari.site")
@RequestMapping("/api/v1")
public class MemberController {

Expand Down

0 comments on commit 7b7ceab

Please sign in to comment.