SPClaimsUtility.AuthenticateFormsUser method
Authenticates a forms user by checking user name and password.
Namespace: Microsoft.SharePoint.IdentityModel
Assembly: Microsoft.SharePoint.IdentityModel (in Microsoft.SharePoint.IdentityModel.dll)
Syntax
'Declaration
Public Shared Function AuthenticateFormsUser ( _
context As Uri, _
userName As String, _
password As String _
) As Boolean
'Usage
Dim context As Uri
Dim userName As String
Dim password As String
Dim returnValue As Boolean
returnValue = SPClaimsUtility.AuthenticateFormsUser(context, _
userName, password)
public static bool AuthenticateFormsUser(
Uri context,
string userName,
string password
)
Parameters
context
Type: System.UriA URI that represents the context.
userName
Type: System.StringA string that represents the username.
password
Type: System.StringA string that represents the password.
Return value
Type: System.Boolean
true if the user is validated; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The username parameter is a null reference (Nothing in Visual Basic) or empty. The password parameter is a null reference (Nothing in Visual Basic) or empty. The context parameter is a null reference (Nothing in Visual Basic). |
Remarks
When the user is validated this object persists a cookie to the client for later use.