< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Authentication.ClientCertificateAuthenticationOptions
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Authentication/ClientCertificateAuthenticationOptions.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
100%
Covered lines: 23
Uncovered lines: 0
Coverable lines: 23
Total lines: 67
Line coverage: 100%
Branch coverage
75%
Covered branches: 3
Total branches: 4
Branch coverage: 75%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 01/21/2026 - 17:07:46 Line coverage: 100% (23/23) Branch coverage: 75% (3/4) Total lines: 67 Tag: Kestrun/Kestrun@3f6f61710c7ef7d5953cab578fe699c1e5e01a36 01/21/2026 - 17:07:46 Line coverage: 100% (23/23) Branch coverage: 75% (3/4) Total lines: 67 Tag: Kestrun/Kestrun@3f6f61710c7ef7d5953cab578fe699c1e5e01a36

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_DisplayName()100%11100%
get_GlobalScheme()100%11100%
get_Description()100%11100%
get_DocumentationId()100%11100%
get_Host()100%11100%
get_Deprecated()100%11100%
get_Logger()75%44100%
set_Logger(...)100%11100%
ApplyTo(...)100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Authentication/ClientCertificateAuthenticationOptions.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Authentication.Certificate;
 2using Kestrun.Hosting;
 3
 4namespace Kestrun.Authentication;
 5
 6/// <summary>
 7/// Options for configuring Client Certificate Authentication in Kestrun.
 8/// </summary>
 9public class ClientCertificateAuthenticationOptions : CertificateAuthenticationOptions, IOpenApiAuthenticationOptions, I
 10{
 11    /// <inheritdoc/>
 2312    public string? DisplayName { get; set; }
 13
 14    /// <inheritdoc/>
 2615    public bool GlobalScheme { get; set; }
 16
 17    /// <inheritdoc/>
 2918    public string? Description { get; set; }
 19
 20    /// <inheritdoc/>
 6221    public string[] DocumentationId { get; set; } = [];
 22
 23    /// <inheritdoc/>
 3624    public KestrunHost Host { get; set; } = default!;
 25
 26    /// <inheritdoc/>
 2927    public bool Deprecated { get; set; }
 28
 29    private Serilog.ILogger? _logger;
 30
 31    /// <inheritdoc/>
 32    public Serilog.ILogger Logger
 33    {
 234        get => _logger ?? (Host is null ? Serilog.Log.Logger : Host.Logger);
 135        set => _logger = value;
 36    }
 37
 38    /// <summary>
 39    /// Helper to copy values from a user-supplied ClientCertificateAuthenticationOptions instance
 40    /// to the instance created by the framework inside AddCertificate().
 41    /// </summary>
 42    /// <param name="target">The target instance to which values will be copied.</param>
 43    public void ApplyTo(ClientCertificateAuthenticationOptions target)
 44    {
 45        // Copy base CertificateAuthenticationOptions properties
 946        target.AllowedCertificateTypes = AllowedCertificateTypes;
 947        target.ChainTrustValidationMode = ChainTrustValidationMode;
 948        target.CustomTrustStore = CustomTrustStore;
 949        target.RevocationFlag = RevocationFlag;
 950        target.RevocationMode = RevocationMode;
 951        target.ValidateCertificateUse = ValidateCertificateUse;
 952        target.ValidateValidityPeriod = ValidateValidityPeriod;
 53
 54        // Copy event handlers
 955        target.Events = Events;
 56
 57        // Copy IAuthenticationHostOptions properties
 958        target.Host = Host;
 59
 60        // OpenAPI / documentation properties (IOpenApiAuthenticationOptions)
 961        target.GlobalScheme = GlobalScheme;
 962        target.Description = Description;
 963        target.DocumentationId = DocumentationId;
 964        target.DisplayName = DisplayName;
 965        target.Deprecated = Deprecated;
 966    }
 67}