Skip to content

Code samples of how to generate sha256 HMAC signatures of your user identifier

License

Notifications You must be signed in to change notification settings

mrand-chameleon/verification

 
 

Repository files navigation

Verification (aka. Secure Mode)

Code samples of how to generate timestamp-anchored SHA256 HMAC signature of your user identifier

Please add a PR with any changes that you find along the way!


Updating your installation

When updating the on-page Chameleon snippet to work with Secure mode, follow the examples below:

When using plain JavaScript:

chmln.identify(USER_ID, { uid_hash: USER_ID_HASH_FROM_BACKEND });

When using Segment.com:

// Two calls, first skipping Chameleon then second with only Chameleon
//
analytics.identify(USER_ID, OPTIONS, { Chameleon: false });
analytics.identify(USER_ID, { uid_hash: USER_ID_HASH_FROM_BACKEND, ...OPTIONS }, { All: false, Chameleon: true });

About

Code samples of how to generate sha256 HMAC signatures of your user identifier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 19.4%
  • Go 17.1%
  • Python 14.0%
  • JavaScript 13.5%
  • C# 12.2%
  • PHP 11.9%
  • Ruby 11.9%