Skip to content

Commit a8eb7fc

Browse files
committed
250613
1 parent 4bc2895 commit a8eb7fc

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

programming/boot-sunflower/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ repositories {
2424
}
2525

2626
dependencies {
27+
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
28+
implementation 'org.springframework.boot:spring-boot-starter-security'
2729
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
2830
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
2931
implementation 'org.springframework.boot:spring-boot-starter-web'

programming/boot-sunflower/src/main/resources/application-prod.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,39 @@ spring:
2020
url: ${DB_URL}
2121
username: ${DB_USER}
2222
password: ${DB_PASSWORD}
23+
# Security
24+
security:
25+
oauth2:
26+
client:
27+
registration:
28+
kakao:
29+
client-id: ${KAKAO_CLIENT_ID}
30+
client-secret: ${KAKAO_CLIENT_SECRET}
31+
client-authentication-method: client_secret_post
32+
authorization-grant-type: authorization_code
33+
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
34+
scope:
35+
- profile_nickname
36+
# - account_email # 추가적 동의가 필요하다
37+
provider:
38+
kakao:
39+
authorization-uri: https://kauth.kakao.com/oauth/authorize
40+
token-uri: https://kauth.kakao.com/oauth/token
41+
user-info-uri: https://kapi.kakao.com/v2/user/me
42+
user-name-attribute: id
2343
gemini:
24-
key: ${GEMINI_KEY}
44+
key: ${GEMINI_KEY}
45+
springdoc:
46+
swagger-ui:
47+
enabled: false
48+
api-docs:
49+
enabled: false
50+
51+
# JWT
52+
jwt:
53+
# openssl rand -base64 32
54+
secret: ${JWT_SECRET}
55+
expiration-ms: ${JWT_EXPIRATION_MS} # 1시간
56+
# 화면단 url
57+
front-end:
58+
redirect: ${FRONT_END_REDIRECT}

0 commit comments

Comments
 (0)