Spring Boot 1.5.3 with Spring security OAuth2 2.1.0
Java
Switch branches/tags
Nothing to show
Latest commit d47efd1 May 19, 2017 @mirage22 committed on GitHub Update README.adoc
Permalink
Failed to load latest commit information.
src travis configuration May 19, 2017
.gitignore Initial commit May 18, 2017
.travis.yml travis configuration May 19, 2017
LICENSE
README.adoc Update README.adoc May 19, 2017
build.gradle application context test May 19, 2017
settings.gradle init implementation May 18, 2017

README.adoc

Simple OAuth2 Server with InMemory user

Build Status

used versions: spring-Boot 1.5.3 and spring-security-oauth2 2.1.0

The sample application create fully-fledged OAuth2 Authorization Server. Example uses inMemory authenticaiton. Sample application use used as example end-point for Robo4J Http-Client testing.

User: tester
Password: test

Gradle build tool has configured task to execture example directly from the command-line

$gradle runExample

....
security.oauth2.client.clientId = exampleapp
security.oauth2.client.secret = ****

Check publicly available part

after having example started

curl -i http://localhost:8080/free

Hello Free Robo4J End-Point!

Fetching access_token

curl exampleapp:magicsecret@localhost:8080/oauth/token -d username=tester -d password=test -d grant_type=password

...
{"access_token":"7d417506-7e54-4629-b19f-69a8dd56c3c9","token_type":"bearer","refresh_token":"b1ada09f-27c5-4cf4-ac4b-6df4a4096771","expires_in":43199,"scope":"read write"}

Accessing secure part

curl -i -H "Authorization: Bearer 7d417506-7e54-4629-b19f-69a8dd56c3c9" http://localhost:8080/secure

...
Hello Secure Robo4J End-Point!