title: Spring Boot Application to validate oauth2 token from Google
body: <p>I have my Spring Boot application, that provides some rest endpoints. Those rest endpoints need security, and I want to use the Oauth2 for it.</p>
  
  <p>My idea is to use Google oauth2 token for that. I don't want to provide login functionality in my Spring Boot app, so I just want to check that the Bearer token is there and get the user info from it to display his/her data accordingly.</p>
  
  <p>I'm checking this tutorial, but I don't think it's exactly what I want</p>
  
  <p><a href="https://www.baeldung.com/spring-security-5-oauth2-login" rel="noreferrer">https://www.baeldung.com/spring-security-5-oauth2-login</a></p>