Merge branch 'v9/dev' into v9/contrib

This commit is contained in:
Sebastiaan Janssen
2022-04-19 13:16:20 +02:00
42 changed files with 1527 additions and 591 deletions

View File

@@ -0,0 +1,20 @@
using System.Runtime.Serialization;
namespace Umbraco.Cms.Core.Models
{
[DataContract]
public class UserTwoFactorProviderModel
{
public UserTwoFactorProviderModel(string providerName, bool isEnabledOnUser)
{
ProviderName = providerName;
IsEnabledOnUser = isEnabledOnUser;
}
[DataMember(Name = "providerName")]
public string ProviderName { get; }
[DataMember(Name = "isEnabledOnUser")]
public bool IsEnabledOnUser { get; }
}
}

View File

@@ -58,4 +58,12 @@ namespace Umbraco.Cms.Core.Services
/// </summary>
Task<IEnumerable<string>> GetEnabledTwoFactorProviderNamesAsync(Guid userOrMemberKey);
}
[Obsolete("This will be merged into ITwoFactorLoginService in Umbraco 11")]
public interface ITwoFactorLoginService2 : ITwoFactorLoginService
{
Task<bool> DisableWithCodeAsync(string providerName, Guid userOrMemberKey, string code);
Task<bool> ValidateAndSaveAsync(string providerName, Guid userKey, string secret, string code);
}
}