ow
This commit is contained in:
1 parent
3461a2e921
commit
ddfbd7d0f2
17 files changed
+523
-241
No files matched your search
@@ -49,6 +49,8 @@ namespace CloudBuilder.Core.Application.Options
|
||||
/// </summary>
|
||||
public RedisOptions Redis { get; set; }
|
||||
|
||||
public WebAuthnOptions WebAuthn { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 获取或设置 Swagger选项
|
||||
///// </summary>
|
||||
|
||||
@@ -67,6 +67,14 @@ namespace CloudBuilder.Core.Application.Options
|
||||
options.Redis = redis;
|
||||
}
|
||||
|
||||
// WebAuthnOptions
|
||||
section = _configuration.GetSection("CloudBuilder:WebAuthn");
|
||||
WebAuthnOptions webAuthn = section.Get<WebAuthnOptions>();
|
||||
if (webAuthn != null)
|
||||
{
|
||||
options.WebAuthn = webAuthn;
|
||||
}
|
||||
|
||||
//// SwaggerOptions
|
||||
//section = _configuration.GetSection("CloudBuilder:Swagger");
|
||||
//SwaggerOptions swagger = section.Get<SwaggerOptions>();
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CloudBuilder.Core.Application.Options
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Plain-old-data wrapper for the credential fields we persist on
|
||||
/// SecurityUser. The frontend never sees this type.
|
||||
/// </summary>
|
||||
public class StoredBiometricCredential
|
||||
{
|
||||
public byte[] CredentialId { get; set; } = Array.Empty<byte>();
|
||||
public byte[] PublicKey { get; set; } = Array.Empty<byte>();
|
||||
}
|
||||
|
||||
public class WebAuthnOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Relying Party ID — the registrable domain suffix of the
|
||||
/// origin's host. For dev: "localhost". For production:
|
||||
/// </summary>
|
||||
public string RpId { get; set; } = "localhost";
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable relying-party name. Shown in the OS biometric
|
||||
/// prompt ("Use Cloud Builder to sign in to localhost").
|
||||
/// </summary>
|
||||
public string RpName { get; set; } = "Cloud Builder";
|
||||
|
||||
/// <summary>
|
||||
/// The full origin (scheme + host + port) the user is loading
|
||||
/// the page from. Fido2NetLib verifies the attestation/assertion
|
||||
/// origin matches this exactly. Must be HTTPS in production
|
||||
/// (localhost is exempt).
|
||||
/// </summary>
|
||||
public string Origin { get; set; } = "http://localhost:8080";
|
||||
|
||||
/// <summary>
|
||||
/// WebAuthn ceremony timeout in milliseconds. Default 60s.
|
||||
/// </summary>
|
||||
public int TimeoutMs { get; set; } = 60000;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user