Update PodeJwt - mdaneri/Pode GitHub Wiki
Updates the expiration time of a JWT token.
Update-PodeJwt [-ExpirationExtension <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Update-PodeJwt -Token <String> [-ExpirationExtension <Int32>] -Certificate <String> [-PrivateKeyPath <String>]
[-CertificatePassword <SecureString>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Update-PodeJwt -Token <String> [-ExpirationExtension <Int32>] -X509Certificate <X509Certificate2>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Update-PodeJwt -Token <String> [-ExpirationExtension <Int32>] -CertificateThumbprint <String>
[-CertificateStoreName <StoreName>] [-CertificateStoreLocation <StoreLocation>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Update-PodeJwt -Token <String> [-ExpirationExtension <Int32>] -CertificateName <String>
[-CertificateStoreName <StoreName>] [-CertificateStoreLocation <StoreLocation>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Update-PodeJwt -Token <String> [-ExpirationExtension <Int32>] -Secret <Object>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Update-PodeJwt [-ExpirationExtension <Int32>] -Authentication <String> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
This function updates the expiration time of a given JWT token by extending it with a specified duration. It supports various signing methods including secret-based and certificate-based signing. The function can handle different types of certificates and authentication methods for signing the updated token.
" -ExpirationExtension 3600 -Secret "MySecretKey"
This example updates the expiration time of a JWT token by extending it by 1 hour using an HMAC secret.
" -ExpirationExtension 3600 -X509Certificate $Certificate
This example updates the expiration time of a JWT token by extending it by 1 hour using an X509 certificate.
The authentication method from Pode's context used for JWT signing.
Type: String
Parameter Sets: AuthenticationMethod
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe path to a certificate file used for signing.
Type: String
Parameter Sets: CertFile
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA certificate subject name to use for RSA or ECDSA signing. (Windows).
Type: String
Parameter Sets: CertName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe password for the certificate file referenced in Certificate.
Type: SecureString
Parameter Sets: CertFile
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe location of a certificate store where a certificate can be found (Default: CurrentUser) (Windows).
Type: StoreLocation
Parameter Sets: CertThumb, CertName
Aliases:
Accepted values: CurrentUser, LocalMachine
Required: False
Position: Named
Default value: CurrentUser
Accept pipeline input: False
Accept wildcard characters: FalseThe name of a certificate store where a certificate can be found (Default: My) (Windows).
Type: StoreName
Parameter Sets: CertThumb, CertName
Aliases:
Accepted values: AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher
Required: False
Position: Named
Default value: My
Accept pipeline input: False
Accept wildcard characters: FalseA certificate thumbprint to use for RSA or ECDSA signing. (Windows).
Type: String
Parameter Sets: CertThumb
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe number of seconds to extend the expiration time by. If not specified, the original expiration duration is used.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalseA key file to be paired with a PEM certificate file referenced in Certificate.
Type: String
Parameter Sets: CertFile
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe secret key used for HMAC signing (string or byte array).
Type: Object
Parameter Sets: Secret
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe JWT token to be updated.
Type: String
Parameter Sets: CertFile, CertRaw, CertThumb, CertName, Secret
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe raw X509 certificate used for RSA or ECDSA signing.
Type: X509Certificate2
Parameter Sets: CertRaw
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.