title: Spring security login to web by token
body: <p>I would like to login user on web page but not using username and password but token.
  So I have two tables</p>
  
  <pre><code>User:
  id
  username
  password
  
  Token:
  id
  user_id
  token
  </code></pre>
  
  <p>So now if user open in browser page domain.com/token/{token}
  then should find user_id by token and load for that user roles, prives, etc.</p>
  
  <p>I was googling about that but only found solutions for JWT (Rest API).</p>
  
  <p>thanks for advice</p>
  
  <p><strong>UPDATE</strong>
  System will generate token for user and will add entry to <code>Token</code> table.</p>
  
  <p>Ex: token is: token3333 for user with id 3 ;)</p>
  
  <p>when user go to page domain.com/token/token3333 then automatically will be logged as user with id 3 without filling in username and password.</p>