[BAEL-1410] Spring Boot OAuth2 Support (#3409)

* initial setup with spring boot/ spring data jpa/ flyway

* BAEL-1315 - added flyway test extensions for spring

* BAEL-1315 - added flyway test extensions for spring

* BAEL-1315 - created multiple migration scripts and locations

* BAEL-1315 - test insert after schema creation

* cleanup

* BAEL-1315 - test data changes by a migration

* [BAEL-1410] Spring Boot Security Auto-Configuration

* [BAEL-1410] Added some tests for incorrect credentials use case

* [BAEL-1410] Added readme and some code improvements

* [BAEL-1410] removed form based auth config because is redundant
added oauth2 server auto-configuration sample with test

* [BAEL-1410] added custom Authorization Server Config

* [BAEL-1410] update README

* [BAEL-1410]refactor tests

* [BAEL-1410]oauth2 resource server

* [BAEL-1410]oauth2 sso sample with facebook

* [BAEL-1410]remove spring-flyway
This commit is contained in:
Bogdan Stoean
2018-01-15 23:05:19 +02:00
committed by Grzegorz Piwowarek
parent 293968321e
commit f993bc0435
17 changed files with 270 additions and 162 deletions
@@ -0,0 +1,3 @@
security.user.password=password
security.oauth2.client.client-id=client
security.oauth2.client.client-secret=secret
@@ -0,0 +1,2 @@
server.port=8081
security.oauth2.resource.userInfoUri=http://localhost:8080/user
@@ -0,0 +1,9 @@
server.port=8082
security.oauth2.client.clientId=<generated_app_id>
security.oauth2.client.clientSecret=<app_secret>
security.oauth2.client.accessTokenUri=https://graph.facebook.com/oauth/access_token
security.oauth2.client.userAuthorizationUri=https://www.facebook.com/dialog/oauth
security.oauth2.client.tokenName=oauth_token
security.oauth2.client.authenticationScheme=query
security.oauth2.client.clientAuthenticationScheme=form
security.oauth2.resource.userInfoUri=https://graph.facebook.com/me
@@ -1,4 +1,4 @@
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration
#spring.profiles.active=form
#spring.profiles.active=basic
#security.user.password=password
#security.user.password=password
#security.oauth2.client.client-id=client
#security.oauth2.client.client-secret=secret