Hi all!
I’m trying to write a python plugin that replaces the key verification done by Tyk with a custom one (essentially pass the token below the chain if there is one).
Following this example, I wrote it, but I always get
“Hook ‘MyAuthMiddleware’ returned an error: ‘CustomKeyCheck’ object has no attribute ‘arg_count’”
when an API is called.
The manifest.json is simply:
{
"file_list": [
"middleware.py"
],
"custom_middleware": {
"auth_check": {
"name": "MyAuthMiddleware"
},
"driver": "python"
}
}
If, instead, I use the @Hook
decorator then I don’t have this issue, but the key verification fails.
Finally, I’ve this issue also with the @Pre
decorator.