I have a WPF application and a SQL Server database with a Users table. Every user has it's own row including hashed password and role in Users table.
I need to let them authenticate in my application and keep some kind of credentials, including role. Based on that role, they will see only what they should see.
Can you give me some clue how to accomplish it? What is the best way to keep those credentials and hide parts of my application based on user's role?
Thanks for any help, JiKra
Ok, I was thinking and how about to use a singleton? User authenticates, I grab his role from database, instantiate a singleton, set his credentials and use them in my app. Is that correct? It's the easiest way to do that? JiKra