Merge pull request #1466 from sbwalker/dev

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:50:00 -04:00
committed by GitHub
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"))