title: Oauth2; How to solve the issue with expired AccessToken during multiple async api calls , made concurrently?
body: <p>I'm using Spring Security Oauth2 as a security layer in my application. Everything worked well until concurrently  async  calls appeared . </p>
  
  <p>Can someone tell me how to handle the next case : <br/> 
  1. The client has an accessToken which already has expired.<br/> 
  2. The client makes two concurrent async api calls to my api ( for example : Thread1, Thread2). <br/> 
  3. The Thread1  receives an error : "accessToken expired", before Thread2 . <br/> 
  4. By using  the refreshToken  Thread1  receives a new accessToken = qqqqq. <br/> 
  5. The Thread2  receives an error : "accessToken expired", before Thread1  makes a new call to server with the new accessToken = qqqqq . <br/> 
  6. By using  the refreshToken  Thread2  receives a new accessToken = wwwww and removes the accessToken = qqqqq . <br/> 
  7. Here , the Thread1  makes a call to server with accessToken = qqqqq which is not active. <br/> 
  8. Theoretically, it is quite possible to loop both Threads by invalidating  each other.<br/> </p>
  
  <p>I will appreciate any help , thanks. </p>