aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Authentication
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-08-10 21:42:46 -0400
committerGitHub <noreply@github.com>2019-08-10 21:42:46 -0400
commita96fa7a5c705d8b694c828ff451a77d60711d329 (patch)
tree0bfcdd9166036bdb9d52686ad29bb255ed9e8801 /MediaBrowser.Controller/Authentication
parent5c366e46975d7d541ecacedc0a80b1d269fde007 (diff)
parent0f897589ed6349bb3c88919b06861daa80aec1be (diff)
Merge pull request #1397 from Bond-009/passfast
Streamline authentication proccess
Diffstat (limited to 'MediaBrowser.Controller/Authentication')
-rw-r--r--MediaBrowser.Controller/Authentication/AuthenticationException.cs28
-rw-r--r--MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs3
-rw-r--r--MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs1
3 files changed, 30 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Authentication/AuthenticationException.cs b/MediaBrowser.Controller/Authentication/AuthenticationException.cs
new file mode 100644
index 000000000..045cbcdae
--- /dev/null
+++ b/MediaBrowser.Controller/Authentication/AuthenticationException.cs
@@ -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)
+ {
+
+ }
+ }
+}
diff --git a/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs b/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
index 2cf531eed..f5571065f 100644
--- a/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
+++ b/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
@@ -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);
}
diff --git a/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs b/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs
index 9e5cd8816..2639960e7 100644
--- a/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs
+++ b/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs
@@ -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; }