title: How to design a restful url for login?
body: <p>I did a research on this topic, but I still cannot find any answer.</p>
  
  <p>I'm trying to use oauth2 and jwt to implement a web login function, then I need a rest style api between backend and frontend.</p>
  
  <p>10 years ago, people just use ..../login to deal with it, but Restful api suggest that there is no verb in the url. So some people suggest that we can use ....../accesstoken, then POST username and password to get a token.</p>
  
  <p>However, I think if we consider an accesstoken as resource, when we want to get the accesstoken, we should use GET method, isn't it?</p>
  
  <p>So my question is: What is the best practice when designing a restful style url for login? Or just restful api is unable to achieve that?</p>
  
  <p>Thanks!</p>
  
  <p>===updated===</p>
  
  <p>in spring oauth2, the default url it provide is post grant_type and relative info to the url /oauth/token. But shoud we use GET method to get resource? </p>