Using callout to validate API token

I have a scenario where I need to use AAA / Unified Gateway to authenticate users, but would like to pass-through valid tokens directly to the API without using AAA – if the token is valid.

My solution was to create a callout in NetScaler to validate the token, and if valid allow access through to the backend. This may also be used in other cases like providing cached API responses from NetScaler.

It works like a charm! If you have any feedback or questions, feel free to leave a comment.

Disclaimer: All information on this blog is offered "as is" with no warranty. It is strongly recommended that you verify all information and validate all scripts in isolated test environments before using them in production environments.