23 lines
1.1 KiB
C#
23 lines
1.1 KiB
C#
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.AspNet.Identity
|
|
{
|
|
/// <summary>
|
|
/// Provides an abstraction for validating passwords.
|
|
/// </summary>
|
|
/// <typeparam name="TUser">The type that represents a user.</typeparam>
|
|
public interface IPasswordValidator
|
|
{
|
|
/// <summary>
|
|
/// Validates a password as an asynchronous operation.
|
|
/// </summary>
|
|
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve the <paramref name="user"/> properties from.</param>
|
|
/// <param name="user">The user whose password should be validated.</param>
|
|
/// <param name="password">The password supplied for validation</param>
|
|
/// <returns>The task object representing the asynchronous operation.</returns>
|
|
Task<IdentityResult> ValidateAsync<TUser>(UserManager<TUser> manager, TUser user, string password) where TUser : class;
|
|
}
|
|
} |