Can I add my custom code in API Gateway

Can I add my custom code in the API Gateway? e.g. we have a library which does authentication based on our company’s rules and does some other useful stuff so can I use that rather than tyk’s authentication methods like when a request comes, it uses the library code and authenticates and then goes to the API.

Hi, have you looked at the custom plugin functionality to deliver this?

https://tyk.io/extend-tyk/
and
https://tyk.io/tyk-documentation/customise-tyk/plugins/