Spring Boot 1.5.3 with Spring security OAuth2 2.1.0
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
README.adoc
build.gradle
settings.gradle

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!