add passkey functionality

This commit is contained in:
sbwalker
2025-10-29 12:31:50 -04:00
parent e548c21c94
commit 7e69b5193f
18 changed files with 757 additions and 294 deletions

View File

@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Http.Json;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Oqtane.Enums;
using Oqtane.Models;
using Oqtane.Shared;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Oqtane.Services
{
@@ -206,6 +208,17 @@ namespace Oqtane.Services
await CheckResponse(response, uri);
}
protected async Task<string> PostStringAsync(string uri)
{
var response = await GetHttpClient().PostAsync(uri, null);
if (await CheckResponse(response, uri) && ValidateJsonContent(response.Content))
{
var result = await response.Content.ReadAsStringAsync();
return result;
}
return default;
}
protected async Task<T> PostJsonAsync<T>(string uri, T value)
{
return await PostJsonAsync<T, T>(uri, value);