en-US/PoshJsonWebToken.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>New-JsonWebToken</command:name>
      <command:verb>New</command:verb>
      <command:noun>JsonWebToken</command:noun>
      <maml:description>
        <maml:para>Creates a signed Json Web Token (JWT).</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The `New-JsonWebToken` cmdlet can be used to create a new Json Web Token (JWT) using a secret key or certificate.</maml:para>
      <maml:para>The following symmetric hash algorithms support secret key:</maml:para>
      <maml:para>+ `HS256` - HMAC with SHA-256 + `HS384` - HMAC with SHA-384 + `HS512` - HMAC with SHA-512</maml:para>
      <maml:para>The following asymmetric hash algorithms support certificates:</maml:para>
      <maml:para>+ `RS256` - RSA Signature with SHA-256 + `RS384` - RSA Signature with SHA-384 + `RS512` - RSA Signature with SHA-512 + `ES256` - P-256 curve and SHA-256 + `ES384` - P-384 curve and SHA-384 + `ES512` - P-512 curve and SHA-512</maml:para>
      <maml:para>The above algorithms have their advantages and disadvantages, depending on the use case and the level of security required.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>New-JsonWebToken</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Algorithm</maml:name>
          <maml:description>
            <maml:para>The hash algorithm. Currently PS256, PS384 and PS512 algorithms are not supported. If `none` is used, a warning message is displayed indicating plain text algorithm is used without integrity protection.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">none</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES512</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">JwsAlgorithm</command:parameterValue>
          <dev:type>
            <maml:name>JwsAlgorithm</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Certificate</maml:name>
          <maml:description>
            <maml:para>The signing certificate of type `System.Security.Cryptography.X509Certificates.X509Certificate2`. Must be specified and contain the private key if the algorithm is RS256, RS384, RS512, ES256, ES384 or ES512.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue>
          <dev:type>
            <maml:name>X509Certificate2</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ExtraHeader</maml:name>
          <maml:description>
            <maml:para>The extra headers needed to sign JWT token. These headers are not including the `alg` header which is passed using `-Algorithm` parameter.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
          <dev:type>
            <maml:name>Hashtable</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Payload</maml:name>
          <maml:description>
            <maml:para>The payload containing the claims to sign.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
          <dev:type>
            <maml:name>Hashtable</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>New-JsonWebToken</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Algorithm</maml:name>
          <maml:description>
            <maml:para>The hash algorithm. Currently PS256, PS384 and PS512 algorithms are not supported. If `none` is used, a warning message is displayed indicating plain text algorithm is used without integrity protection.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">none</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES512</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">JwsAlgorithm</command:parameterValue>
          <dev:type>
            <maml:name>JwsAlgorithm</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ExtraHeader</maml:name>
          <maml:description>
            <maml:para>The extra headers needed to sign JWT token. These headers are not including the `alg` header which is passed using `-Algorithm` parameter.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
          <dev:type>
            <maml:name>Hashtable</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Payload</maml:name>
          <maml:description>
            <maml:para>The payload containing the claims to sign.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
          <dev:type>
            <maml:name>Hashtable</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>SecretKey</maml:name>
          <maml:description>
            <maml:para>The HMAC secret secret key. Must be specified if the algorithm is HS256, HS384 or HS512.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
          <dev:type>
            <maml:name>SecureString</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Algorithm</maml:name>
        <maml:description>
          <maml:para>The hash algorithm. Currently PS256, PS384 and PS512 algorithms are not supported. If `none` is used, a warning message is displayed indicating plain text algorithm is used without integrity protection.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">JwsAlgorithm</command:parameterValue>
        <dev:type>
          <maml:name>JwsAlgorithm</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Certificate</maml:name>
        <maml:description>
          <maml:para>The signing certificate of type `System.Security.Cryptography.X509Certificates.X509Certificate2`. Must be specified and contain the private key if the algorithm is RS256, RS384, RS512, ES256, ES384 or ES512.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue>
        <dev:type>
          <maml:name>X509Certificate2</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>ExtraHeader</maml:name>
        <maml:description>
          <maml:para>The extra headers needed to sign JWT token. These headers are not including the `alg` header which is passed using `-Algorithm` parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
        <dev:type>
          <maml:name>Hashtable</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Payload</maml:name>
        <maml:description>
          <maml:para>The payload containing the claims to sign.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
        <dev:type>
          <maml:name>Hashtable</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>SecretKey</maml:name>
        <maml:description>
          <maml:para>The HMAC secret secret key. Must be specified if the algorithm is HS256, HS384 or HS512.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
        <dev:type>
          <maml:name>SecureString</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Security.SecureString</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>Output is secured so Json Web Token (JWT) encrypyted string is not exposed.</maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$payload = @{ 'a' = 'b' }
$header = @{ 'exp' = 1300819380 }
$secretKey = 'abc' | ConvertTo-SecureString -AsPlainText -Force
$algorithm = 'HS256'

# Generate JWT token
$token = New-JsonWebToken -Payload $Payload -Algorithm $algorithm -SecretKey $SecretKey -ExtraHeader $header</dev:code>
        <dev:remarks>
          <maml:para>Creating a HS256 JWT token using secret key.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>$payload = @{ 'a' = 'b' }
$header = @{ 'exp' = 1300819380 }
$algorithm = 'RS256'

$certificatePath = Resolve-Path -Path 'cert.p12'
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certificatePath)

# Generate JWT token
$token = New-JsonWebToken -Payload $Payload -Algorithm $algorithm -Certificate $certificate -ExtraHeader $header</dev:code>
        <dev:remarks>
          <maml:para>Creating a RS256 JWT token using certificate.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Test-JsonWebToken</command:name>
      <command:verb>Test</command:verb>
      <command:noun>JsonWebToken</command:noun>
      <maml:description>
        <maml:para>Tests Json Web Token (JWT) is valid.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The `Test-JsonWebToken` cmdlet can be used to ensure Json Web Token (JWT) is valid.</maml:para>
      <maml:para>The following symmetric hash algorithms support secret key:</maml:para>
      <maml:para>+ `HS256` - HMAC with SHA-256 + `HS384` - HMAC with SHA-384 + `HS512` - HMAC with SHA-512</maml:para>
      <maml:para>The following asymmetric hash algorithms support certificates:</maml:para>
      <maml:para>+ `RS256` - RSA Signature with SHA-256 + `RS384` - RSA Signature with SHA-384 + `RS512` - RSA Signature with SHA-512 + `ES256` - P-256 curve and SHA-256 + `ES384` - P-384 curve and SHA-384 + `ES512` - P-512 curve and SHA-512</maml:para>
      <maml:para>The above algorithms ensures strict validation is performed on the Json Web Token (JWT). This means that you will specify which algorithm you are expecting to receive in the header.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Test-JsonWebToken</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Algorithm</maml:name>
          <maml:description>
            <maml:para>The hash algorithm. Currently PS256, PS384 and PS512 algorithms are not supported. If `none` is used, a warning message is displayed indicating plain text algorithm is used without integrity protection.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">none</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES512</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">JwsAlgorithm</command:parameterValue>
          <dev:type>
            <maml:name>JwsAlgorithm</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Certificate</maml:name>
          <maml:description>
            <maml:para>The signing certificate of type `System.Security.Cryptography.X509Certificates.X509Certificate2`. Must be specified and contain the private key if the algorithm is RS256, RS384, RS512, ES256, ES384 or ES512.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue>
          <dev:type>
            <maml:name>X509Certificate2</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Token</maml:name>
          <maml:description>
            <maml:para>The signed JWT token to validate.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
          <dev:type>
            <maml:name>SecureString</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Test-JsonWebToken</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Algorithm</maml:name>
          <maml:description>
            <maml:para>The hash algorithm. Currently PS256, PS384 and PS512 algorithms are not supported. If `none` is used, a warning message is displayed indicating plain text algorithm is used without integrity protection.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">none</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">HS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">RS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">PS512</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES256</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES384</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">ES512</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">JwsAlgorithm</command:parameterValue>
          <dev:type>
            <maml:name>JwsAlgorithm</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>SecretKey</maml:name>
          <maml:description>
            <maml:para>The HMAC secret secret key. Must be specified if the algorithm is HS256, HS384 or HS512.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
          <dev:type>
            <maml:name>SecureString</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Token</maml:name>
          <maml:description>
            <maml:para>The signed JWT token to validate.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
          <dev:type>
            <maml:name>SecureString</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Algorithm</maml:name>
        <maml:description>
          <maml:para>The hash algorithm. Currently PS256, PS384 and PS512 algorithms are not supported. If `none` is used, a warning message is displayed indicating plain text algorithm is used without integrity protection.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">JwsAlgorithm</command:parameterValue>
        <dev:type>
          <maml:name>JwsAlgorithm</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Certificate</maml:name>
        <maml:description>
          <maml:para>The signing certificate of type `System.Security.Cryptography.X509Certificates.X509Certificate2`. Must be specified and contain the private key if the algorithm is RS256, RS384, RS512, ES256, ES384 or ES512.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">X509Certificate2</command:parameterValue>
        <dev:type>
          <maml:name>X509Certificate2</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>SecretKey</maml:name>
        <maml:description>
          <maml:para>The HMAC secret secret key. Must be specified if the algorithm is HS256, HS384 or HS512.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
        <dev:type>
          <maml:name>SecureString</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Token</maml:name>
        <maml:description>
          <maml:para>The signed JWT token to validate.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue>
        <dev:type>
          <maml:name>SecureString</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Boolean</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>If JWT token is valid this cmdlet returns `True`, otherwise an exception is thrown and the cmdlet returns `False`.</maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$payload = @{ 'a' = 'b' }
$header = @{ 'exp' = 1300819380 }
$secretKey = 'abc' | ConvertTo-SecureString -AsPlainText -Force
$algorithm = 'HS256'

# Generate JWT token
$token = New-JsonWebToken -Payload $Payload -Algorithm $algorithm -SecretKey $SecretKey -ExtraHeader $header

# Validate JWT token
Test-JsonWebToken -Token $token -SecretKey $SecretKey -Algorithm $algorithm</dev:code>
        <dev:remarks>
          <maml:para>Validates signed JWT token using secret key and HS256 algorithm.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>$payload = @{ 'a' = 'b' }
$header = @{ 'exp' = 1300819380 }
$algorithm = 'RS256'

$certificatePath = Resolve-Path -Path 'cert.p12'
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certificatePath)

# Generate JWT token
$token = New-JsonWebToken -Payload $Payload -Algorithm $algorithm -Certificate $certificate -ExtraHeader $header

# Validate JWT token
Test-JsonWebToken -Token $token -Certificate $certificate -Algorithm $algorithm</dev:code>
        <dev:remarks>
          <maml:para>Validates signed JWT token using certificate and RS256 algorithm.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>