Spring Security¶
The current implementation follows the Spring Boot oauth2 tutorial and connects to OAUTH2 from GitHub and Facebook.
Configuration¶
The configuration for the OAUTH2 authentication is present in two files and the respective OAUTH2 services.
- Application.java (src/main/java/com/github.com/joostvdg.keepwatching)
- application.yml (src/main/resources)
- Facebook Developer Portal
- GitHub OAUTH2 introduction
application.yml¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | facebook: client: clientId: XXXXXXXXXXXX clientSecret: XXXXXXXXXXXX accessTokenUri: https://graph.facebook.com/oauth/access_token userAuthorizationUri: https://www.facebook.com/dialog/oauth tokenName: oauth_token authenticationScheme: query clientAuthenticationScheme: form resource: userInfoUri: https://graph.facebook.com/me github: client: clientId: XXXXXXXXXXXX clientSecret: XXXXXXXXXXXX accessTokenUri: https://github.com/login/oauth/access_token userAuthorizationUri: https://github.com/login/oauth/authorize clientAuthenticationScheme: form resource: userInfoUri: https://api.github.com/user |