I am searching a working oauth2 provider server implemented on java, leeloo and spring security are some that I have found, but there is no working example.
https://github.com/SpringSource/spring-security-oauth/wiki/tutorial
https://bitbucket.org/smartproject/oauth-2.0/wiki/Home