Open jfmartinezm opened 7 months ago
It sounds like you want webhooks for Libki logins. Can you tell me what kind of data that webhook would need to transmit?
In this particular case, our system needs to get the username, the password and the ip address of the client. But maybe the webhook could allow to choose what information should be sent, with some kind of configuration setting, eg:
---
- webhook: http://server/endpoint
attributes_to_send:
- username
- password
- client.ipaddress
This way, the webhook system could be used to send different information to different endpoints, and perhaps on different events (login, logout, client registration, etc).
I like the idea, but not so much for sending a user's password anywhere.
It's true that having a password involved makes it more of an authentication issue than a simple notification/webhook one. Perhaps it should be handled on a custom authentication module like the one proposed in #305 (which I intended to build eventually anyway).
Love the idea of webhooks on key events; that'll make Libki that much more interoperable with other systems.
I agree with Kyle that sending passwords is not appropriate for this feature, but would be for a custom authenticator. We'll use this issue for tracking webhooks, and #305 for the authenticator idea. Sound good?
In our system, when a user logs in, Libki should send a notification to an external system to perform additional tasks. This notification has to be sent over HTTP to a certain endpoint.
This feature could be implemented by creating a new module which contains the notification code (similar to /lib/Libki/LDAP.pm or SIP.pm), and calling it on successful login/logout.