Tyk keys with custom authentication

I am trying to use the keys that I created on endpoint tyk/keys/create with my custom authentication plugin, but it didn’t work as I expected, how can I validate the key received with the one that is saved in tyk database? I am getting confused on how to use quotas and rate limit with my custom plugin.

You can GET the key from the endpoint tyk/keys/<*key-id> and view its details [1]

Keys are stored in Redis, you can check the key there as well. The name in Redis is usually apikey-<**>

The key object looks like this, and the fields are explained as well.

Quotas and Rate limits can be defined on the key [2] [3] when you create it…

This sample delegates authentication to python middleware, and you can set the rate limit (as shown in the sample) and quota on the session.
IF you’re going this way, you do not need to first create a key with tyk/keys/create

1 Like

This is exactly what I was looking for, thank you!

1 Like