Undo unnecessary ApiHeaders changes

This commit is contained in:
Jordan Dominion
2025-03-09 22:16:35 -04:00
parent ffc5bccfd1
commit 47c720d8f5
-13
View File
@@ -53,11 +53,6 @@ namespace Tgstation.Server.Api
/// </summary>
public const string OAuthAuthenticationScheme = "OAuth";
/// <summary>
/// The OIDC authentication header scheme.
/// </summary>
public const string OpenIDConnectAuthenticationSchemePrefix = "OpenIdConnect.";
/// <summary>
/// Added to <see cref="MediaTypeNames.Application"/> in netstandard2.1. Can't use because of lack of .NET Framework support.
/// </summary>
@@ -108,11 +103,6 @@ namespace Tgstation.Server.Api
/// </summary>
public TokenResponse? Token { get; }
/// <summary>
/// The parsed <see cref="AuthenticationHeaderValue"/> if any.
/// </summary>
public AuthenticationHeaderValue? AuthenticationHeader { get; }
/// <summary>
/// The client's username.
/// </summary>
@@ -262,7 +252,6 @@ namespace Tgstation.Server.Api
{
splits.RemoveAt(0);
var parameter = String.Concat(splits);
AuthenticationHeader = new AuthenticationHeaderValue(scheme, parameter);
if (String.IsNullOrEmpty(parameter))
AddError(HeaderErrorTypes.AuthorizationInvalid, "Missing authentication parameter!");
else
@@ -331,8 +320,6 @@ namespace Tgstation.Server.Api
Password = String.Concat(basicAuthSplits.Skip(1));
break;
default:
if (!scheme.StartsWith(OpenIDConnectAuthenticationSchemePrefix))
AddError(HeaderErrorTypes.AuthorizationInvalid, "Invalid authentication scheme!");
break;
}
}