mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 16:39:21 +01:00
Undo unnecessary ApiHeaders changes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user