Add-KrJWTHeader

SYNOPSIS

Adds a header to the JWT token builder.

SYNTAX

Add-KrJWTHeader [-Builder] <JwtTokenBuilder> [-Name] <String> [-Value] <Object> [<CommonParameters>]

DESCRIPTION

This function adds a header to the JWT token builder, allowing for the specification of additional header fields.

EXAMPLES

EXAMPLE 1

$builder = New-KrJWTTokenBuilder | Add-KrJWTHeader -Name "customHeader" -Value "headerValue"
This example creates a new JWT token builder and adds a custom header to it.

PARAMETERS

-Builder

The JWT token builder to modify.

Type: JwtTokenBuilder
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

The name of the header to add.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value

The value of the header to add.

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

[Kestrun.Jwt.JwtTokenBuilder]

The modified JWT token builder.

NOTES

This function is part of the Kestrun.Jwt module and is used to build JWT tokens. Maps to JwtTokenBuilder.AddHeader