Merge pull request #1397 from Bond-009/passfast

Streamline authentication proccess
This commit is contained in:
Joshua M. Boniface
2019-08-10 21:42:46 -04:00
committed by GitHub
11 changed files with 372 additions and 369 deletions

View File

@@ -0,0 +1,28 @@
using System;
namespace MediaBrowser.Controller.Authentication
{
/// <summary>
/// The exception that is thrown when an attempt to authenticate fails.
/// </summary>
public class AuthenticationException : Exception
{
/// <inheritdoc />
public AuthenticationException() : base()
{
}
/// <inheritdoc />
public AuthenticationException(string message) : base(message)
{
}
/// <inheritdoc />
public AuthenticationException(string message, Exception innerException)
: base(message, innerException)
{
}
}
}

View File

@@ -9,10 +9,9 @@ namespace MediaBrowser.Controller.Authentication
string Name { get; }
bool IsEnabled { get; }
Task<ProviderAuthenticationResult> Authenticate(string username, string password);
Task<bool> HasPassword(User user);
bool HasPassword(User user);
Task ChangePassword(User user, string newPassword);
void ChangeEasyPassword(User user, string newPassword, string newPasswordHash);
string GetPasswordHash(User user);
string GetEasyPasswordHash(User user);
}

View File

@@ -12,6 +12,7 @@ namespace MediaBrowser.Controller.Authentication
Task<ForgotPasswordResult> StartForgotPasswordProcess(User user, bool isInNetwork);
Task<PinRedeemResult> RedeemPasswordResetPin(string pin);
}
public class PasswordPinCreationResult
{
public string PinFile { get; set; }