replace HttpWebRequest by HttpClient on another place

This commit is contained in:
UbitUmarov
2023-05-16 22:57:23 +01:00
parent 7860e2d861
commit 19229aff64
8 changed files with 244 additions and 59 deletions

View File

@@ -30,6 +30,7 @@ using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Net;
using System.Net.Http.Headers;
namespace OpenSim.Framework.ServiceAuth
{
@@ -62,6 +63,12 @@ namespace OpenSim.Framework.ServiceAuth
auth.AddAuthorization(headers);
}
public void AddAuthorization(HttpRequestHeaders headers)
{
foreach (IServiceAuth auth in m_authentications)
auth.AddAuthorization(headers);
}
public bool Authenticate(string data)
{
return m_authentications.TrueForAll(a => a.Authenticate(data));