On This Page
Session Validation
The session JWT is digitally signed using RS256. You must confirm that it was issued by
Barclays
and has not been tampered with. Follow these steps to
validate the signature:- Parse the session JWT header to extract the key ID (kid):{ "kid": "3g", "alg": "RS256" }
- Retrieve the public key by sending a request to the/flex/v2/public-keys/{kid}endpoint:
- Test: GETapi.smartpayfuse-test.barclaycardflex/v2/public-keys/{kid}
- Production: GETapi.smartpayfuse.barclaycardflex/v2/public-keys/{kid}
- Use the returned RSA public key in JSON Web Key format to verify the JWT signature.IMPORTANTDepending on the cryptographic library that tou use, you may need to convert the key to Privacy-Enhanced Mail (PEM) format.