This is an example of jersey2 application behaving as a oauth2 resource server. The application is using some of the internal spring libraries to decode JWT tokens and with openid-configuration JWKS.
This project can tested on Jetty using the "Run Jetty Run" Eclipse plugin.
Steps after installing the plugin from the eclipse market place:
- mvn clean
- mvn package
- On project in eclipse right click -> maven -> update project
- On the project right click and run as Run Jetty
- Stop the process from running on the console
- Go to Run Configurations and edit the Jetty application configuration and edit the context to: /
- Now rerun with Run as: Run Jetty
For more info: https://github.com/xzer/run-jetty-run/wiki/GettingStarted