[v0.0.2] Adds Google and Github OAuth2 Authentication

Adds to the API the feature of OAuth2 Authentication via two providers: Google and Github. For that the tests were updated.
This commit is contained in:
2022-11-10 01:03:32 -03:00
parent 0252695a7a
commit 9d93f04817
25 changed files with 514 additions and 149 deletions

View File

@@ -1,6 +1,6 @@
com:
hideyoshi:
frontEndPath: ${FRONTEND_PATH}
frontendPath: ${FRONTEND_PATH}
frontendConnectionType: ${FRONTEND_CONNECTION_TYPE}
tokenSecret: ${TOKEN_SECRET}
accessTokenDuration: ${ACCESS_TOKEN_DURATION}
@@ -17,6 +17,26 @@ server:
spring:
security:
oauth2:
client:
registration:
google:
clientId: ${GOOGLE_CLIENT_ID}
clientSecret: ${GOOGLE_CLIENT_SECRET}
redirectUri: ${GOOGLE_REDIRECT_URL}
scope:
- email
- profile
github:
clientId: ${GITHUB_CLIENT_ID}
clientSecret: ${GITHUB_CLIENT_SECRET}
redirectUri: ${GITHUB_REDIRECT_URL}
scope:
- user
datasource:
url: jdbc:${DATABASE_URL}
username: ${DATABASE_USERNAME}