asp.net - Implementing authentication in an webpage through WinForms app -
And here comes the situation ...
A customer has installed my Super Cooper Winform application is. Username and password are authenticated on App Startup with my MSSQL server.
I want to redirect the user to my webpage and when he clicks on the "Update Subscription" button
Any thoughts or Opposition should be welcomed
I will suggest a slight change in your architecture.
Instead of authenticating from the WinForms app directly to the database, create a simple web service allows you to pass authentication token in passing in the username and password and in response to a successful login. Maybe this makes us some kind of user name + password hash.
Token generation / authentication is included in your website code by putting arguments for it in your website, and you can change it to one place instead of ensuring part of WinForms and share the site in sync is.
Anyway, the WinForms app can then capture tokens in memory, and it can pass back to the web site in the query string (). You can see the user using the hash, and can log in as well:
Select user_id from user where MD5 (connet (user name, password)) = ' TOKEN_HERE '
Alternatively, you can generate a particular hash on each authentication via a web service (perhaps using a GUID), and in any table it is user ID To map it back with timestamp To finish it after a certain time can be stored.
Comments
Post a Comment