aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Authentication
diff options
context:
space:
mode:
authorLogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>2019-08-06 00:26:19 -0700
committerGitHub <noreply@github.com>2019-08-06 00:26:19 -0700
commit984e415c66cbd995d12ea95a3a9d3e2561ce4869 (patch)
tree1799942f3836641786c0e29249801bdb46aac0f4 /MediaBrowser.Controller/Authentication
parentc2667f99f4d50f4f7d9bbeec50e8491e52468962 (diff)
parent89f592687ee7ae7f0e0fffd884dbf2890476410a (diff)
Merge pull request #5 from jellyfin/master
Merge up to latest master
Diffstat (limited to 'MediaBrowser.Controller/Authentication')
-rw-r--r--MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs3
-rw-r--r--MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs20
2 files changed, 23 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs b/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
index b9f282bd2..2cf531eed 100644
--- a/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
+++ b/MediaBrowser.Controller/Authentication/IAuthenticationProvider.cs
@@ -11,6 +11,9 @@ namespace MediaBrowser.Controller.Authentication
Task<ProviderAuthenticationResult> Authenticate(string username, string password);
Task<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);
}
public interface IRequiresResolvedUser
diff --git a/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs b/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs
new file mode 100644
index 000000000..9e5cd8816
--- /dev/null
+++ b/MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Threading.Tasks;
+using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Users;
+
+namespace MediaBrowser.Controller.Authentication
+{
+ public interface IPasswordResetProvider
+ {
+ string Name { get; }
+ bool IsEnabled { get; }
+ Task<ForgotPasswordResult> StartForgotPasswordProcess(User user, bool isInNetwork);
+ Task<PinRedeemResult> RedeemPasswordResetPin(string pin);
+ }
+ public class PasswordPinCreationResult
+ {
+ public string PinFile { get; set; }
+ public DateTime ExpirationDate { get; set; }
+ }
+}