Brian Dunning's FileMaker Custom Functions

GenerateJWT ( header ; claim ; algorithm ; privatekey ; password )

To generate a JWT using native FileMaker Functionality

  Average rating: 5.0 (1 vote) Log in to vote

Robert D Trammel   Robert D Trammel - Show more from this author
https://www.linkedin.com/in/robertdtrammel/

Share on Facebook Share on Twitter

  Sample input:
GenerateJWT( $header; $claim; "SHA256"; $privateRSA; "" )
  Sample output:
eyJhbGciOiJIUzI1NiIsInR5cGUiOiJKV1QifQ.eyJIZWxsbyI6IndvcmxkIn0.Pwaksjakdhfiwjokso

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Developed with help from the amazing post at - https://msdev.nz/generating-jwts-in-native-filemaker/

I'm not sure I would have figured out that I needed to do more than blank out the "=" signs in enough time to finish the project without that much needed article.

This is intended to allow you to generate JSON Web Tokens using FileMaker native functionality. At which point, you would just pass it to whatever service you're using it for. In my case, I used it to authenticate a google service.

You can also validate your JSON Web Tokens and learn more about them over at https://jwt.io

Google Specific Guides:
Scopes: https://developers.google.com/identity/protocols/oauth2/scopes#gmail
JWT config: https://developers.google.com/identity/protocols/oauth2/service-account#httprest

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: