Base code for OAuth2 / REST workshop based on Yammer's dropwizard
The drop wizard university-foo application was developed to showcase the use of OAuth2 and provide a basic - yet dummy - REST interface for demo and workshop purposes.
It resulted in the full-blown - production running - framework apis.
Included with this application is an in-memory implementation of a OAuth2 Provider to grant access tokens (something missing in the DropWizard example codebase)
To bootstrap the example application run the following commands.
To package the example run (maven3 is a prerequisite to install the university-foo app).
mvn package
To run the server run (in debug mode).
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 target/university-foo-0.1-SNAPSHOT.jar server university-foo-dev.yml
To run the server in your IDE simply run the application class src/main/java/org/surfnet/example/api/UniversityFooService.java
To test the application you will need an OAuth2 client. The https://github.com/OpenConext/Mujina/tree/master/mujina-sp application can be used to test the OAuth provider in this application. Fire up mujina-sp and point your browser to: http://localhost:9090/social/social-queries.shtml
The OAuth2 configuration for the university-foo application is:
To authenticate an user the identifiers foo1...10 can be used with a fake password. The placeholder help page can be found at: