UserManager<TUser, TKey>.CheckPasswordAsync Method

Determines whether the password is valid for the user.

Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Syntax

'Declaration
Public Overridable Function CheckPasswordAsync ( _
    user As TUser, _
    password As String _
) As Task(Of Boolean)
'Usage
Dim instance As UserManager 
Dim user As TUser
Dim password As String 
Dim returnValue As Task(Of Boolean)

returnValue = instance.CheckPasswordAsync(user, _
    password)
public virtual Task<bool> CheckPasswordAsync(
    TUser user,
    string password
)
public:
virtual Task<bool>^ CheckPasswordAsync(
    TUser user, 
    String^ password
)
abstract CheckPasswordAsync : 
        user:'TUser * 
        password:string -> Task<bool> 
override CheckPasswordAsync : 
        user:'TUser * 
        password:string -> Task<bool> 
public function CheckPasswordAsync(
    user : TUser, 
    password : String
) : Task<boolean>

Parameters

  • user
    Type: TUser
    The user.

Return Value

Type: System.Threading.Tasks.Task<Boolean>
The task representing the asynchronous operation that returns true if the password is valid for the user; otherwise, false.

See Also

Reference

UserManager<TUser, TKey> Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity