Files
Umbraco-CMS/src/Umbraco.Web/Security/IBackOfficeUserPasswordChecker.cs
2018-11-22 14:05:51 +00:00

26 lines
1.1 KiB
C#

using System.Threading.Tasks;
using Umbraco.Core.Models.Identity;
namespace Umbraco.Web.Security
{
/// <summary>
/// Used by the BackOfficeUserManager to check the username/password which allows for developers to more easily
/// set the logic for this procedure.
/// </summary>
public interface IBackOfficeUserPasswordChecker
{
/// <summary>
/// Checks a password for a user
/// </summary>
/// <param name="user"></param>
/// <param name="password"></param>
/// <returns></returns>
/// <remarks>
/// This will allow a developer to auto-link a local account which is required if the user queried doesn't exist locally.
/// The user parameter will always contain the username, if the user doesn't exist locally, the other properties will not be filled in.
/// A developer can then create a local account by filling in the properties and using UserManager.CreateAsync
/// </remarks>
Task<BackOfficeUserPasswordCheckerResult> CheckPasswordAsync(BackOfficeIdentityUser user, string password);
}
}