Skip to content

Commit

Permalink
πŸ› oauth2 λ¦¬λ‹€μ΄λ ‰μ…˜ μ„€μ •
Browse files Browse the repository at this point in the history
- 404 μ—λŸ¬λ₯Ό μˆ˜μ •ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.
  • Loading branch information
Ganghee-Lee-0522 committed Jan 11, 2024
1 parent f418310 commit d75103d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ application-dev2.yml
application-dev.yml
application-local2.yml
application-local.yml
application-prod2.yml
application-prod.yml
.gradle
build/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
//
// ) // μ»€μŠ€ν…€ 둜그인 νŽ˜μ΄μ§€κ°€ ν•„μš”ν•˜μ§€ μ•ŠμœΌλ―€λ‘œ, 둜그인 μ‹œ λ¦¬λ‹€μ΄λ ‰μ…˜μ΄ ν•„μš”μ—†λ‹€.
.redirectionEndpoint( redirection -> redirection
.baseUri("/api/auth/redirect") // OAuth 2.0 κ³΅κΈ‰μžλ‘œλΆ€ν„° μ½”λ“œκ°€ λ¦¬λ‹€μ΄λ ‰μ…˜λ  λ•Œμ˜ κΈ°λ³Έ URI
.baseUri("/login/oauth2/code/github") // OAuth 2.0 κ³΅κΈ‰μžλ‘œλΆ€ν„° μ½”λ“œκ°€ λ¦¬λ‹€μ΄λ ‰μ…˜λ  λ•Œμ˜ κΈ°λ³Έ URI
//
) // λ¦¬λ‹€μ΄λ ‰μ…˜ μ—”λ“œν¬μΈνŠΈ μ„€μ •
.successHandler(successHandler) // OAuth 2.0 둜그인 성곡 μ‹œμ˜ ν•Έλ“€λŸ¬λ₯Ό μ„€μ •
Expand Down
43 changes: 43 additions & 0 deletions src/main/resources/application-prod2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
spring:
redis:
port: 6379 # λ ˆλ””μŠ€ μ„œλ²„ 포트
host: 43.202.240.195 # λ ˆλ””μŠ€ μ„œλ²„ 호슀트
# mvc:
# cors:
# mapping: /**
# allowed-origins:
# allowed-methods: GET, POST, PUT, PATCH, DELETE
datasource:
url: jdbc:mysql://snowflowerthon.czlsnoazot7m.ap-northeast-2.rds.amazonaws.com:3306/snowflowerthon
username: admin
password: ewha1886
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
database-platform: org.hibernate.dialect.MySQLDialect
open-in-view: false # λ·° λ ˆμ΄μ–΄μ—μ„œμ˜ 지연 λ‘œλ”©μ΄ λΉ„ν™œμ„±ν™”(μ„±λŠ₯ 이슈 방지)
hibernate:
ddl-auto: update # μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹œμž‘ μ‹œ λ°μ΄ν„°λ² μ΄μŠ€ μŠ€ν‚€λ§ˆλ₯Ό μœ νš¨μ„± κ²€μ¦λ§Œ ν•˜κ³ , 변경은 μˆ˜ν–‰ν•˜μ§€ μ•ŠμŒ
logging:
level:
org:
hibernate:
type:
descriptor:
sql: trace
security:
oauth2:
client:
registration:
github:
client-id: bc039b97d186450287ad # snowman
client-secret: ff211c639606f36c980e7986fbe2db9348b24c2b

secret:
key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKb/4snaHoUpcJJuEghayTVfy3w3EUg19ftxM524fbpFwZsF2YqHP1HlaDcAtLdvNSuQWHemq53+fyxnQCyAFiUCAwEAAQ==
issuer: committers
time:
access: 2592000000 # 30일
refresh: 2592000000 # 30일

github:
token: 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
6 changes: 3 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ feign:

logging:
level:
com.example: DEBUG
web: TRACE
org.springframework.web: TRACE
com.example: INFO
web: INFO
org.springframework.web: INFO

0 comments on commit d75103d

Please sign in to comment.