Build-KrJWT
SYNOPSIS
Builds the JWT token from the builder.
SYNTAX
Build-KrJWT [-Builder] <JwtTokenBuilder> [<CommonParameters>]
DESCRIPTION
This function finalizes the JWT token construction by invoking the Build method on the JwtTokenBuilder instance.
EXAMPLES
EXAMPLE 1
$token = New-KrJWTTokenBuilder | Add-KrJWTSubject -Subject "mySubject" |
Add-KrJWTIssuer -Issuer "myIssuer" |
Add-KrJWTAudience -Audience "myAudience" |
Build-KrJWT
This example creates a new JWT token builder, adds a subject, issuer, and audience, and then builds the JWT token.
PARAMETERS
-Builder
The JWT token builder to finalize.
Type: JwtTokenBuilder
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
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.JwtBuilderResult]
The constructed JWT token.
NOTES
This function is part of the Kestrun.Jwt module and is used to build JWT tokens. Maps to JwtTokenBuilder.Build