Google OAuth2 and JAX-RS


These days users have so many accounts… Google, Facebook, Twitter, LinkedIn, etc. Managing all of these accounts can quickly become a chore. As an application developer, you have the choice of allowing your users to reuse an existing account e.g. Google or creating a new account dedicated to your application. Reusing an existing account clearly has benefits. The user has one less account to maintain. He has one less username/password to remember. He has one less account to potentially have hacked! In this post we will look at how we can enable a user to access our application using an existing account e.g. Google. To do so, I will explain how to authenticate a user using OAuth2. We will also look at how to do this using a JAX-RS REST service.


  • What is OAuth2?
  • JAX-RS Example: How to authenticate a user’s Google account using OAuth2
  • Register you application with…

View original post 1,251 more words