title: Implement refresh token in Spring Security + Angular
body: <p>I'm working on this Spring Security <a href="https://github.com/dzinot/spring-boot-2-oauth2-authorization-jwt" rel="nofollow noreferrer">implementation</a> with OAuth2 and JWT:</p>
  <p>According to the author I can access resources using token this way:</p>
  <p><em><code>To access a resource use (you'll need a different application which has configured ResourceServer):</code></em></p>
  <p><em><code>http localhost:8080/users 'Authorization: Bearer '$ACCESS_TOKEN</code></em></p>
  <p>About this step:</p>
  <p><em><code>To use the refresh token functionality:</code></em></p>
  <p><em><code>http --form POST adminapp:password@localhost:9999/oauth/token grant_type=refresh_token refresh_token=$REFRESH_TOKEN</code></em></p>
  <p>It's not clear for me when I need to refresh the token and how to handle this part into Angular.
  When the Token expires do I need to first send request to the endpoint for refreshing the token and then to the login page?</p>
  <p>How this case should be implemented?</p>