Home All Groups Group Topic Archive Search About

wcf and UserNamePasswordValidator

Author
18 May 2009 12:29 PM
Ivan
Hello,

how can I get the username and password in a method?

When I call a method like Login or ValidateUser, I have to read the current
username and password for checking with UsersDatabase.

I can't check in the Validate-Method of UserNamePasswordValidator because I
havn't all information about UsersDatabase-Connection at this time.

How can I store the Username and Password after the Validate-Method and read
again in my Method.

Thanks for helping.
Regards Ivan

Author
18 May 2009 2:27 PM
Cor Ligthert[MVP]
Ivan,

You won't get the password, the user you can get with

The My.User.Name

Maybe you can use more of this.

http://msdn.microsoft.com/en-us/library/ms172992(VS.80).aspx

Cor
Author
18 May 2009 3:23 PM
Ivan
Hello Cor

Thanks for your answer.

I don't understand this UserNamePasswordValidator-Thing.

I would like to check the username and password with
UserNamePasswordValidator and the validate-method. User names and passwords
are stored in my sqlDatabase. When I don't have all Information for the
connection to the Database in the Validate-Method, it isn't possible to check
the user? I would like to check the username and the password in a method
like

Private sub Login(byref mySqlDBConnectionProperties ..)
  'Get the username and password of the UserNamePasswordValidator
  'Connect to database and check the user
end sub

Could you explain how to do this in practise? Are there different methods to
do this? Could you let me know the most used method to check the user with my
own sql database.

Thank you very much.
Best regards.
Ivan



Show quoteHide quote
"Cor Ligthert[MVP]" wrote:

> Ivan,
>
> You won't get the password, the user you can get with
>
> The My.User.Name
>
> Maybe you can use more of this.
>
> http://msdn.microsoft.com/en-us/library/ms172992(VS.80).aspx
>
> Cor
>