diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-03-29 18:26:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-29 18:26:30 -0400 |
| commit | 72dd6091091a8352336c85a6799e3f3c24b849c5 (patch) | |
| tree | d715eb11f5d78dc2f0bea4c110d764ba6d791841 /MediaBrowser.Controller | |
| parent | d9e7883fb50c765795c8bb6994c64a3245d00615 (diff) | |
| parent | 13e94a8b1b78d570a528eee65ff777412f0e83c8 (diff) | |
Merge pull request #1149 from LogicalPhallacy/ImprovedPasswordReset
Adds per user password reset
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 0000000000..9e5cd88160 --- /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 925d91a375..7f73708931 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(); } } |
