diff options
| author | Phallacy <Dragoonmac@gmail.com> | 2019-03-22 00:01:23 -0700 |
|---|---|---|
| committer | Phallacy <Dragoonmac@gmail.com> | 2019-03-22 00:01:23 -0700 |
| commit | 09921a00aaad31c0ea4a0650e8d0ddb890dca735 (patch) | |
| tree | 06915aded5a829b47d22d6640715ec8f72cfe967 /MediaBrowser.Controller | |
| parent | c2667f99f4d50f4f7d9bbeec50e8491e52468962 (diff) | |
made password resets an interface and per user
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Authentication/IPasswordResetProvider.cs | 20 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Library/IUserManager.cs | 3 |
2 files changed, 22 insertions, 1 deletions
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; } + } +} diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index 925d91a37..7f7370893 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -200,8 +200,9 @@ namespace MediaBrowser.Controller.Library /// <returns>System.String.</returns> string MakeValidUsername(string username); - void AddParts(IEnumerable<IAuthenticationProvider> authenticationProviders); + void AddParts(IEnumerable<IAuthenticationProvider> authenticationProviders, IEnumerable<IPasswordResetProvider> passwordResetProviders); NameIdPair[] GetAuthenticationProviders(); + NameIdPair[] GetPasswordResetProviders(); } } |
