title: Spting Boot OAuth2 with multiple databases
body: <p>I'm trying to implement an application that uses one shared authorization server, but the authorization server looks up for users in different databases.</p>
  
  <p>E.g. I have database A and B, let it be Postgres and Oracle. A and B databases consist of the identical in structure tables and have <code>users</code> table. So if an user from database A or B wants to login, authorization server should resolve this correctly (look for A user in A database, B user in B database, ... N user in N database). If user is found and password matches, then oauth server creates a token and stores it inside 'shared' database C, like Redis or Mongo (this is not a problem). </p>
  
  <p>I successfully configured OAuth2 client, resource server and oauth server for one database, but is there a good way to handle such a situation for multiple different databases (data sources)?</p>