• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TykTechnologies / tyk / 5134

Build:
DEFAULT BRANCH: master
Ran 13 Jun 2018 03:17PM UTC
Jobs 2
Files 103
Run time 34min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5134

push

travis-ci

web-flow
New token generation, support for custom hashing algorithms (#1753)

Added new scheme of generating tokens, now it is JSON base64 objects, similar to how JWT works, which allows us add any meta information to the tokens.

Example of new token:
`eyJvcmciOiIiLCJpZCI6IjAxZGIwN2Q5NWQ0MDRjYjM5ODg3ZjUwN2ZmNTg0OGUzIiwiaCI6Im11cm11cjEyOCJ9`. After based64 decoding it turns to: `{"org":"","id":"01db07d95d404cb39887f507ff5848e3","h":"murmur128”}`.

Current token has 3 fields at the moment:
- “org” - organization id
- “id” - token id, as we had before. For regular tokens random uuid, but for example for JWTs or OpenID based on sub.
- “h” - token hashing algorithm

At the moment following algorithms are supported: `murmur32`, `murmur64`, `murmur128`, `sha256`.

You can set hashing algorithm to use via new config variable: `hash_key_function`.

If config value not set, it generates legacy tokens like we had before. We may consider switching it to `murmur64` by default in next releases, once feature will stabilize.

You can change hashing function dynamically, and have tokens with multiple hashing algos, including handling of legacy tokens. So if you turn on new key support, you old legacy tokens will continue working. Same if you decided to switch different algorithm or turn this off.

Fix https://github.com/TykTechnologies/tyk/issues/1694

9267 of 15670 relevant lines covered (59.14%)

1.3 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5134.1 (LATEST_GO=true) 13 Jun 2018 03:17PM UTC 0
58.54
Travis Job 5134.1
2 5134.2 (LATEST_GO=true) 13 Jun 2018 03:17PM UTC 0
59.13
Travis Job 5134.2
Source Files on build 5134
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5134
  • 90fab733 on github
  • Prev Build on master (#5129)
  • Next Build on master (#5136)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc