Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of Membership.ValidateUser()

I've been learning about the MembershipProvider class and I thought that the Membership.ValidateUser() method was supposed to be used to to log a user in.

However, I just learned that there is a FormsAuthentication.Authenticate().

What is the purpose of ValidateUser() within Membership?

like image 894
Luke Avatar asked Aug 23 '12 15:08

Luke


People also ask

How Membership ValidateUser works?

We start by calling the Membership. ValidateUser method, passing in the supplied username and password. If that method returns true, then the user is signed into the site via the FormsAuthentication class's RedirectFromLoginPage method.

What is membership in C#?

Class members, in C#, are the members of a class that represent the data and behavior of a class. Class members are members declared in the class and all those (excluding constructors and destructors) declared in all classes in its inheritance hierarchy.


1 Answers

In short, there are times when you might want to simply validate that a user is who they say they are without needing to persist an authentication cookie for any length of time.

like image 73
Grant H. Avatar answered Nov 12 '22 04:11

Grant H.