UserManagerExtensions.CheckPassword<TUser, TKey> Method (UserManager<TUser, TKey>, TUser, String)

 

Determines whether the password combination is valid for the user.

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

Syntax

public static bool CheckPassword<TUser, TKey>(
    this UserManager<TUser, TKey> manager,
    TUser user,
    string password
)
where TUser : class, IUser<TKey>
where TKey : object, IEquatable<TKey>
public:
generic<typename TUser, typename TKey>
where TUser : ref class, IUser<TKey>
where TKey : Object, IEquatable<TKey>
[ExtensionAttribute]
static bool CheckPassword(
    UserManager<TUser, TKey>^ manager,
    TUser user,
    String^ password
)
static member CheckPassword<'TUser, 'TKey when 'TUser : not struct and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>> : 
        manager:UserManager<'TUser, 'TKey> *
        user:'TUser *
        password:string -> bool
<ExtensionAttribute>
Public Shared Function CheckPassword(Of TUser As { Class, IUser(Of TKey) }, TKey As { Object, IEquatable(Of TKey) }) (
    manager As UserManager(Of TUser, TKey),
    user As TUser,
    password As String
) As Boolean

Parameters

  • user
    Type: TUser

    The user.

Return Value

Type: System.Boolean

true if the password combination is valid for the user; otherwise, false.

Type Parameters

  • TUser
    The type of the user.
  • TKey
    The type of the key.

See Also

UserManagerExtensions Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity

Return to top