Class MockAuthRequirement

Namespace
Kuestenlogik.Bowire.Mocking
Assembly
Kuestenlogik.Bowire.dll

Auth-requirement block (#558 model; enforced by #562's 401 gate). Declares that the mock should require authentication and how the accepted credential is presented.

public sealed class MockAuthRequirement
Inheritance
MockAuthRequirement
Inherited Members

Constructors

MockAuthRequirement()

public MockAuthRequirement()

Properties

AuthRecordingId

Forward hook (#562): id of a captured auth recording that would source the accepted credential. Persisted + round-tripped but not yet resolved — there is no id-addressable auth-recording store today, so the credential comes from Credential.

[JsonPropertyName("authRecordingId")]
public string? AuthRecordingId { get; set; }

Property Value

string

Credential

The exact accepted credential value (bearer/basic token or api-key). When set, the gate requires an exact match; when empty, the gate requires only that some credential of the scheme is present.

[JsonPropertyName("credential")]
public string? Credential { get; set; }

Property Value

string

Header

Header the credential is carried in (default Authorization for bearer/basic).

[JsonPropertyName("header")]
public string? Header { get; set; }

Property Value

string

Required

When true, #562's gate rejects unauthenticated requests with 401.

[JsonPropertyName("required")]
public bool Required { get; set; }

Property Value

bool

Scheme

Expected credential scheme — "bearer" / "apikey" / "basic" (default bearer).

[JsonPropertyName("scheme")]
public string? Scheme { get; set; }

Property Value

string