Skip to content

Commit

Permalink
feat kookmin-sw#2 - Spring Security 디펜던시 추가, OAuth2.0 카카오 설정
Browse files Browse the repository at this point in the history
build.gradle에 스프링 시큐리티 추가 - ver6
application.yaml에 카카오 OAuth2.0 설정 값 작성
  • Loading branch information
leejh7 committed Mar 6, 2024
1 parent c479e77 commit dd15772
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ dependencies {
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

// spring security 설정
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'
}

tasks.named('test') {
Expand Down
18 changes: 17 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,20 @@ spring:
use_sql_comments: false
sql:
init:
mode: always
mode: always
security:
oauth2:
client:
registration:
kakao:
client-id: 0d7c948d8eaadc0e08f3e42636bba3bd
clientSecret: bIH2tF6jMbrRsdAp9DPL7yh97LP8pPXk
authorization-grant-type: authorization_code
redirect-uri: "{baseUrl}/login/oauth2/code/kakao"
client-authentication-method: client_secret_post
provider:
kakao:
authorization-uri: https://kauth.kakao.com/oauth/authorize
token-uri: https://kauth.kakao.com/oauth/token
user-info-uri: https://kapi.kakao.com/v2/user/me
user-name-attribute: id

0 comments on commit dd15772

Please sign in to comment.