Custom Authentication on OAuth 2.0 for grant type password

Hi,

How do we use TYK internal OAuth 2.0 authentication flow to generate Tokens via grant_type : password

and for user name and password validation I have to contact my server for validation.

How do we get this done using TYK ???

That Jan going to be tricky - for that validation flow you’ll need to create a basic auth user in Tyk and grant then access to the OAuth protected api.

To validate against your server, you could add a post-authentication middleware, but that creates duplication, so you might as well just create a custom auth handler.

how do I create a custom Auth handler

This guide might help:

https://www.tyk.io/docs/customise-tyk/plugins/rich-plugins/python/custom-auth-python-tutorial/

There’s a demo auth checker here: