aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-12-11 01:14:55 +0900
committerGitHub <noreply@github.com>2019-12-11 01:14:55 +0900
commit67922dff50967c02e8c0c10f43884fd4e788b012 (patch)
tree40d05de6e82107337d20b62a2d3f3bd93ca71a45 /Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs
parent2a7210ca287f9b7421a9c50497434c3839b07f7f (diff)
parentaffb58ef9e11f7f14192c76074b1199604f6bd67 (diff)
Merge pull request #2041 from Bond-009/warn11
Fix more warnings
Diffstat (limited to 'Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs')
-rw-r--r--Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs10
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))
{