aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common/Authentication
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-27 09:44:17 -0500
committerGitHub <noreply@github.com>2022-10-27 09:44:17 -0500
commit028af934a264a91c831eac3561c5e24833b6ee38 (patch)
tree125b0dc693c72cf97370f9ee9a9f7e51fbdc9210 /src/slskd/Common/Authentication
parenta85c5cf8d414b71ac66455e9d97cac62b29c95ad (diff)
parent218f5d8b2376fbee798c9a4575e5068a602aec04 (diff)
downloadslskd-028af934a264a91c831eac3561c5e24833b6ee38.tar.gz
Merge pull request #711 from slskd/signalr-result
Various improvements to the Network mode functionality
Diffstat (limited to 'src/slskd/Common/Authentication')
-rw-r--r--src/slskd/Common/Authentication/ApiKeyAuthentication.cs43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/slskd/Common/Authentication/ApiKeyAuthentication.cs b/src/slskd/Common/Authentication/ApiKeyAuthentication.cs
index d11e00fb..9225b5a8 100644
--- a/src/slskd/Common/Authentication/ApiKeyAuthentication.cs
+++ b/src/slskd/Common/Authentication/ApiKeyAuthentication.cs
@@ -27,7 +27,6 @@ namespace slskd.Authentication
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Logging;
using NetTools;
- using static slskd.Authentication.ApiKeyAuthenticationHandler;
/// <summary>
/// API key authentication.
@@ -118,33 +117,33 @@ namespace slskd.Authentication
return AuthenticateResult.Success(ticket);
}
+ }
+ /// <summary>
+ /// API key authentication options.
+ /// </summary>
+ public class ApiKeyAuthenticationOptions : AuthenticationSchemeOptions
+ {
/// <summary>
- /// API key authentication options.
+ /// Initializes a new instance of the <see cref="ApiKeyAuthenticationOptions"/> class.
/// </summary>
- public class ApiKeyAuthenticationOptions : AuthenticationSchemeOptions
+ public ApiKeyAuthenticationOptions()
{
- /// <summary>
- /// Initializes a new instance of the <see cref="ApiKeyAuthenticationOptions"/> class.
- /// </summary>
- public ApiKeyAuthenticationOptions()
- {
- }
+ }
- /// <summary>
- /// Gets or sets the route prefix used to identify SignalR authentication attempts.
- /// </summary>
- public string SignalRRoutePrefix { get; set; }
+ /// <summary>
+ /// Gets or sets the route prefix used to identify SignalR authentication attempts.
+ /// </summary>
+ public string SignalRRoutePrefix { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether to support SignalR authentication.
- /// </summary>
- public bool EnableSignalRSupport { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether to support SignalR authentication.
+ /// </summary>
+ public bool EnableSignalRSupport { get; set; }
- /// <summary>
- /// Gets or sets the role for authenticated tickets.
- /// </summary>
- public Role Role { get; set; } = Role.Administrator;
- }
+ /// <summary>
+ /// Gets or sets the role for authenticated tickets.
+ /// </summary>
+ public Role Role { get; set; } = Role.Administrator;
}
}