When a user log in into my application, the credentials are the data for the database (user and password in a doctrine connection configuration). I wrote a AuthenticationProvider. He checks if the user can login with the data. If so, the token with the credentials is stored in the TokenStorage.
Now I overwrote the doctrine ConnectionFactory to add the credentials to the connection data, but the TokenStorage has always no token.
You can find the source code example here: https://github.com/fadoe/playground-dbauth
The login works fine, but when I create the database connection the TokenStorage is empty. I'am logged in as user. Can it be the firewall?