diff options
| author | Bond-009 <bond.009@outlook.com> | 2019-12-17 17:35:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-17 17:35:27 +0100 |
| commit | 6b185119aa329764c1ccc57d9be3e81f05680b69 (patch) | |
| tree | a2dd354a5a55ed9669750ede3f7c00baae4f09be /Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs | |
| parent | 35151553e3fc9ddbe352744af8d832b1337491c8 (diff) | |
| parent | db61a58c39490f86c86c3ee6c6f11743796fb10e (diff) | |
Merge branch 'master' into namingtests
Diffstat (limited to 'Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs b/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs index c043568d5..94f60ea62 100644 --- a/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs +++ b/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs @@ -10,10 +10,17 @@ using MediaBrowser.Model.Cryptography; namespace Emby.Server.Implementations.Library { + /// <summary> + /// The default authentication provider. + /// </summary> public class DefaultAuthenticationProvider : IAuthenticationProvider, IRequiresResolvedUser { private readonly ICryptoProvider _cryptographyProvider; + /// <summary> + /// Initializes a new instance of the <see cref="DefaultAuthenticationProvider"/> class. + /// </summary> + /// <param name="cryptographyProvider">The cryptography provider.</param> public DefaultAuthenticationProvider(ICryptoProvider cryptographyProvider) { _cryptographyProvider = cryptographyProvider; @@ -38,12 +45,13 @@ namespace Emby.Server.Implementations.Library // This is the version that we need to use for local users. Because reasons. public Task<ProviderAuthenticationResult> Authenticate(string username, string password, User resolvedUser) { - bool success = false; if (resolvedUser == null) { throw new ArgumentNullException(nameof(resolvedUser)); } + bool success = false; + // As long as jellyfin supports passwordless users, we need this little block here to accommodate if (!HasPassword(resolvedUser) && string.IsNullOrEmpty(password)) { |
