< Summary - Kestrun — Combined Coverage

Information
Class: Public.JWT.Add-KrJWTAudience
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/JWT/Add-KrJWTAudience.ps1
Tag: Kestrun/Kestrun@6135d944f8787fb570e4dfbacac6e80312799a86
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 38
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 12/01/2025 - 20:55:19 Line coverage: 0% (0/1) Total lines: 38 Tag: Kestrun/Kestrun@638a27c2dd54103f693f023b6ba5f56a884caafa

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/JWT/Add-KrJWTAudience.ps1

#LineLine coverage
 1<#
 2    .SYNOPSIS
 3        Adds an audience to the JWT token builder.
 4    .LINK
 5        https://docs.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtsecuritytoken
 6    .DESCRIPTION
 7        This function adds an audience to the JWT token builder, allowing for the specification of the token's audience.
 8    .PARAMETER Builder
 9        The JWT token builder to modify.
 10    .PARAMETER Audience
 11        The audience to set for the JWT token.
 12    .OUTPUTS
 13        [Kestrun.Jwt.JwtTokenBuilder]
 14        The modified JWT token builder.
 15    .EXAMPLE
 16        $builder = New-KrJWTTokenBuilder | Add-KrJWTAudience -Audience "myAudience"
 17        This example creates a new JWT token builder and adds an audience to it.
 18    .NOTES
 19        This function is part of the Kestrun.Jwt module and is used to build JWT tokens
 20        Maps to JwtTokenBuilder.WithAudience
 21    .LINK
 22        https://docs.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtsecuritytoken
 23#>
 24function Add-KrJWTAudience {
 25    [KestrunRuntimeApi('Everywhere')]
 26    [CmdletBinding()]
 27    [OutputType([Kestrun.Jwt.JwtTokenBuilder])]
 28    param(
 29        [Parameter(Mandatory = $true, ValueFromPipeline)]
 30        [Kestrun.Jwt.JwtTokenBuilder] $Builder,
 31        [Parameter(Mandatory)]
 32        [string] $Audience
 33    )
 34    process {
 035        return $Builder.WithAudience($Audience)
 36    }
 37}
 38

Methods/Properties

Add-KrJWTAudience()