0

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?

9
  • 1
    So you want to access the database layer with an application user if i understand it correctly ? Why would you need that if I may ask ? Commented Jul 31, 2018 at 7:02
  • The database is so designed. Every user how can login is a DBMS user. And his privileges are managed by the DBMS, too. Commented Jul 31, 2018 at 7:17
  • Well still not quite sure why you want to create a separate DB user for each application user. But nevertheless you should show some related code, what did you try and where does it go wrong ? Commented Jul 31, 2018 at 8:42
  • It's not my idea. I only must write a web interface for the database. You can find the code here: github.com/fadoe/playground-dbauth After login you should see on the dashboard the database connecton dump with the login credentials. When you click in the menu the db connection still works with the credentials. Commented Jul 31, 2018 at 10:29
  • possible ideas: stackoverflow.com/questions/16762686/… and stackoverflow.com/questions/15108732/… Commented Jul 31, 2018 at 14:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.