Skip to content

๐Ÿ”oauth2-based metajou authentication server using Webflux

Notifications You must be signed in to change notification settings

MET-AJOU/metajou-auth-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

70 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Met:Ajou Auth Server

1. Summary

์ด ํ”„๋กœ์ ํŠธ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์ธ์ฆ๊ณผ ์ธ๊ฐ€๋งŒ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค๋ฅธ ๋กœ์ง๋“ค์€ ๋„คํŠธ์›Œํฌ ์ƒ์—์„œ ๋ถ„๋ฆฌ๋˜์–ด Http๋ฐฉ์‹์œผ๋กœ ํ†ต์‹  ๋ฐ ์—ฐ๋™๋˜๋„๋ก ์„ค๊ณ„๋์Šต๋‹ˆ๋‹ค.

์ด ์ฝ”๋“œ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ํ”„๋ก ํŠธ ์„œ๋ฒ„๊ฐ€ ์—ฌ๋Ÿฌ API๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๋ฐฉ์‹์„ ๊ฐ€์ •ํ•˜๋ฉฐ, ์ด์— ๋”ฐ๋ผ CORS์™€ ๋„๋ฉ”์ธ ์„ธํŒ…์„ ์ถ”๊ฐ€์ ์œผ๋กœ ํ•ด์ฃผ์–ด์•ผํ•ฉ๋‹ˆ๋‹ค.

2. How to Start

์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„  ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ธฐ์ˆ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  • MySql
  • Redis <= (์ถ”๊ฐ€๋  ์˜ˆ์ •)
  • Jdk-17

์œ„์˜ ๋‚ด์šฉ๋“ค์„ ๋ชจ๋‘ ์„ค์น˜ํ–ˆ๋‹ค๋ฉด,

src.main.resources ์œ„์น˜์— secret.properties๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.

# secret.properties ...

#Service Secret Key
spring.project.role.adminkey={String}

#Service Authkey Settings
spring.project.jjwt.secretkey={String}
spring.project.jjwt.expiration=28800
spring.project.jjwt.tokenname=MSGACCESSTOKEN

#R2DBC Settings
spring.datasource.user.name={String} ex:).name=AccountDB
spring.datasource.user.driver=mysql
spring.datasource.user.url=127.0.0.1
spring.datasource.user.port=3306
spring.datasource.user.username=root
spring.datasource.user.password={String}

#OAuth2 Settings
spring.security.oauth2.client.registration.google.client-id: {String}
spring.security.oauth2.client.registration.google.client-secret: {String}
spring.security.oauth2.client.redirect.url={String}

#Email Sender Settings
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username={String} [email protected]
spring.mail.password={String}
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.propertirs.mail.smtp.ssl.enable = true

#Service Root Domain
spring.service.root.domain= {String} <= ex:)metajou.kro.kr

#CORS Domain Settings
spring.client.webserver.url={String} <= ex:)http://www.metajou.kro.kr:3000
spring.client.cors.url={String} <= ex:)http://www.metajou.kro.kr:3000

3. How to Use

์ด ํ”„๋กœ์ ํŠธ์˜ API๋Š” Swagger๋ฅผ ์ด์šฉํ•˜์—ฌ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰ํ•œ ๋’ค ์•„๋ž˜์˜ URL๊ณผ ๊ฐ™์ด /api ๋กœ ์ ‘๊ทผํ•˜๋ฉด SwaggerํŽ˜์ด์ง€๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

http://localhost:8080/api

About

๐Ÿ”oauth2-based metajou authentication server using Webflux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages