question

ericstock avatar image
ericstock asked

Need to validate a JWT

To ensure a user owns our game, the client will download a license in the form of a JWT. This will then get passed to playfab cloudscript where we need to validate it. Using cloudscript is it possible to download a public x509 certificate and use this to validate the JWT?

For example, in Node.js there are many cryptography libraries available to do this. However in cloudscript, I am not sure what is available to represent a x509 cert and to perform the RSA encryption.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

The CloudScript cannot import external libraries. It is recommended that you use an Azure Function to import the required libraries to implement the function. If you are familiar with Node.js, you can write Azure Function in Javascript or the other supported Azure Functions languages.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.