privacyidea / privacyidea

:closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)
http://www.privacyidea.org
GNU Affero General Public License v3.0
1.53k stars 321 forks source link

Here is an alternative SMS Gateway using Twilio API #554

Closed gyp5y closed 7 years ago

gyp5y commented 7 years ago

I've made an additional SMS Gateway module. It uses Twilio REST API client (https://github.com/twilio/twilio-python/tree/next-gen) It would be nice to see it in next releases.

TwilioSMSProvider.py.zip

cornelinux commented 7 years ago

Cool. Thanks a lot! Can you create a pull request? Otherwise I will check and merge the zip.

gyp5y commented 7 years ago

I don't know how to add twilio-python to dependencies. I've patched installed version so I can't commit it. Merge zip and add deps if you can. Thanks.

cornelinux commented 7 years ago

As python-twillo is not contained in a standard distribution repository and I do not want to package and maintain it, I would recomment a conditional import. Thus if the administrator installs this package manually, he is able to use twillo.

cornelinux commented 7 years ago

After looking into the twilio API and the code it does occur to me, that the twilio API can as well be addressed with the normal HTTP SMS Provider. https://www.twilio.com/docs/api/rest/sending-messages We add some documentation.