Click here to Skip to main content
15,886,873 members

Comments by Vitaly Obukhov (Top 3 by date)

Vitaly Obukhov 30-Aug-12 6:04am View    
If all persons didn't know password then pc should provide it. They just should use some common authentication scheme (basic, digest, etc…) for this and only client pc should have access to related password (token).
Basically you can use client IP as it was mentioned above. In this case IP is access token. I suppose this scheme is not very reliable since third party can spoof IP.
Vitaly Obukhov 4-Aug-11 10:42am View    
Deleted
Create form with two textboxes, labels and button. On button click create handler with something like following logic:

var credentials = new Credentials(tbxUsername.Text, tbxPassword.Text);
if (credentials.Validate())
{
//here you save user credentials to some container
}
else
{
MessageBox.Show("Some error message here");
}

This is pseudocode. I suppose main problem is that you want to store user session somehow. You should use some container. For example StructureMap. Then you just put valid credentials after authentications to container and check them whenever you want.
Vitaly Obukhov 4-Aug-11 10:34am View    
You didn't specified type of your app. Login form is mostly used in web applications. Have you any particular problems with this task? If not then just separate your athentication logic from view (form), implement authentication logic and form itself.