< Summary - Kestrun — Combined Coverage

Information
Class: Public.ClaimPolicy.Build-KrClaimPolicy
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/ClaimPolicy/Build-KrClaimPolicy.ps1
Tag: Kestrun/Kestrun@2d87023b37eb91155071c91dd3d6a2eeb3004705
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 33
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 08/26/2025 - 01:25:22 Line coverage: 100% (1/1) Total lines: 32 Tag: Kestrun/Kestrun@07f821172e5dc3657f1be7e6818f18d6721cf38a09/04/2025 - 22:37:32 Line coverage: 100% (1/1) Total lines: 33 Tag: Kestrun/Kestrun@afb7aadc0a8a42bfa2b51ea62c8a6e2cf63faec610/13/2025 - 16:52:37 Line coverage: 0% (0/1) Total lines: 33 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/ClaimPolicy/Build-KrClaimPolicy.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Builds the claim policy configuration from the builder.
 4    .DESCRIPTION
 5        This function finalizes the claim policy construction by invoking the Build method on the ClaimPolicyBuilder ins
 6    .PARAMETER Builder
 7        The claim policy builder to finalize.
 8    .OUTPUTS
 9        [Kestrun.Claims.ClaimPolicyConfig]
 10        The constructed claim policy configuration.
 11    .EXAMPLE
 12        $policyConfig = New-KrClaimPolicy | Add-KrClaimPolicy -PolicyName "AdminOnly" -ClaimType "role" -AllowedValues "
 13        This example creates a new claim policy builder, adds a policy, and then builds the claim policy configuration.
 14    .NOTES
 15        This function is part of the Kestrun.Claims module and is used to build claim policies
 16        Maps to ClaimPolicyBuilder.Build
 17    .LINK
 18        https://docs.microsoft.com/en-us/dotnet/api/kestrun.authentication.claimpolicybuilder.build
 19#>
 20function Build-KrClaimPolicy {
 21    [KestrunRuntimeApi('Everywhere')]
 22    [CmdletBinding()]
 23    [OutputType([Kestrun.Claims.ClaimPolicyConfig])]
 24    param(
 25        [Parameter(Mandatory = $true, ValueFromPipeline)]
 26        [Kestrun.Claims.ClaimPolicyBuilder] $Builder
 27    )
 28
 29    process {
 030        return $Builder.Build()
 31    }
 32}
 33

Methods/Properties

Build-KrClaimPolicy()