FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...
ColdBox Module for encoding and decoding JSON Web Tokens (JWT). This is a port of the CF-JWT-Simple project which itself is a port of the node.js project node-jwt-simple to CFML. It currently supports HmacSHA256, HmacSHA384, and HmacSHA512 signing algorithms.
The module has three functions, encode, decode and verify.
jwt.encode( payload , key , [ algorithm ] ); jwt.decode( token , key , [ algorithm ] ); jwt.verify( token , key , [ algorithm ] );
payload is a JSON string, the
key is a string containing your encoding/decoding password, the
token is a string containing the result of a previous JWT encoding and the optional
algorithm value is one of HmacSHA256, HmacSHA384 or HmacSHA512 (default).
This could be used within a ColdBox security interceptor to create the JWT (encode), decode the JWT or verify the JWT is valid. When using it in an interceptor you need to declare the property using the lazy injector using the
provider keyword, e.g.:
property name="jwt" inject="provider:[email protected]";
Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.
|Version||Created||Last Update||Published By||Stable||Actions|
|1.1.0||Oct 06 2018 08:41 AM||Oct 06 2018 08:41 AM|
|1.0.3||Jun 19 2018 05:48 AM||Jun 19 2018 05:48 AM|
|1.0.2||Nov 03 2017 04:14 AM||Jun 19 2018 05:39 AM|
|1.0.1||Dec 28 2016 04:37 PM||Dec 28 2016 04:37 PM|
|1.0.0||Jul 01 2016 05:23 PM||Jul 01 2016 05:23 PM|