Whatever message this page gives is out now! Go check it out!

VerifySignedJWT

Last update:
May 18, 2026

Description

Verify a signed JWT.

Syntax

verifySignedJWT(token, SignOptions, config)

History

  • New in ColdFusion (2023 release).

Parameters

ParameterDescriptionRequired
tokenA signed token created by ColdFusion.Yes
signOptions
Create the signature using the struct below:
  • Key
  • KeyPair - private Key will be used.
  • JWK- JSON Web Keyset URL or file or string.
  • Keystore file, keystore password, keystore alias
Yes
config
A struct with the following values:
  • clockSkew - time in seconds to account for difference between the systems generating and processing the JWT
  • returntype - plaintext/struct
Yes

Returns

A struct containing all the JWT claims. Not all these claims will be present always. Depends on the party creating the JWT.

Example

<cfset k=getKeyPairfromkeystore({  
        "keystore" : "test_jws1.keystore",
        "keystorePassword": "****",  
        "keypairPassword": "****",  
        "keystoreAlias": "contentKey"
    }) >
 
<cfset c = {
    "algorithm" = "RS256",
    "generateIssuedAt"= true,
"generateJti"=true
}>
 
<cfset config = {
    "returnType" = "struct"
}>
<cfset verifyjws = VerifySignedJWT(#URL.jws#,k.getPublic(),c)>
<cfdump var="#verifyjws#">

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page