back out auth policy header support as Blazor HttpClient is registered as Scoped and can not support variable headers

This commit is contained in:
Shaun Walker
2021-06-11 07:54:02 -04:00
parent d82fc8be90
commit aa5aca3a8e
6 changed files with 11 additions and 65 deletions

View File

@ -27,17 +27,6 @@ namespace Oqtane.Controllers
_authEntityId.Add(param.Key.Substring(4, param.Key.Length - 6), value);
}
}
// if policy authorization dictionary is empty populate from headers
if (_authEntityId.Count == 0)
{
foreach (var param in accessor.HttpContext.Request.Headers)
{
if (param.Key.StartsWith("auth") && param.Key.EndsWith("id") && int.TryParse(param.Value, out value))
{
_authEntityId.Add(param.Key.Substring(4, param.Key.Length - 6), value);
}
}
}
// legacy support
if (_authEntityId.Count == 0 && accessor.HttpContext.Request.Query.ContainsKey("entityid"))