-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create consumer in real-time #21
Comments
@akira28 I don't immeditately see a way to do it without touching DB directly (or admin API), and that could be ugly. However |
ah, nice to know. But how can I create the 'credential' object? And can I call |
Yes you can. On Lua PDK I think credential is just an table of |
by 'the credential value' you mean the 'api key'? |
|
cool, perfect! This simplify things A LOT! |
I'm building a custom authentication plugin based on api keys, and I was wondering if there's a way to create consumers once I get an 'OK' from my internal authentication system. This would allow me avoiding syncing Kong db with my auth system.
One idea was to use the kong.db and create consumers manually, but there's no api for db on kong-js-pdk.
A possible solution would be to add a postgreSQL client like https://node-postgres.com/ to my plugin and do queries directly.
Is there a more elegant solution for this?
Thanks
The text was updated successfully, but these errors were encountered: