[ํ”„๋กœ์ ํŠธ] Spring-Securit-Project

Spring-Securit-Project

Spring Boot(Gradle), Oauth, JPA(MySQL)

Spring Security, Google, Facebook, Naver Login

์ „์ฒด ์†Œ์Šค https://github.com/vividswan/Spring-Security-Project


ํ”„๋กœ์ ํŠธ ๊ตฌ์„ฑ

1

Class

2


Login Page

3


Security ํšŒ์›๊ฐ€์ž… & ๋กœ๊ทธ์ธ

์Šคํ”„๋ง ์‹œํ๋ฆฌํ‹ฐ + BCryptPasswordEncoder

4

DB(์•”ํ˜ธํ™” ํ•ด์‹œ ํ•จ์ˆ˜)

5


Google OAuth ๋กœ๊ทธ์ธ & ์กฐํšŒ

6

Oauth User Data

{
  "id": 10,
  "email": "vividswan@gmail.com",
  "role": "ROLE_USER",
  "providerId": "google",
  "createDate": "2020-10-25T15:19:57.850+00:00"
}

Facebook OAuth ๋กœ๊ทธ์ธ & ์กฐํšŒ

7

Oauth User Data

{
  "id": 11,
  "email": "vividswan@naver.com",
  "role": "ROLE_USER",
  "providerId": "facebook",
  "createDate": "2020-10-25T15:23:15.176+00:00"
}

8

Oauth User Data

{
  "id": 12,
  "email": "vividswan@naver.com",
  "role": "ROLE_USER",
  "providerId": "naver",
  "createDate": "2020-10-25T15:23:57.527+00:00"
}