Skip to main content

Extension for django-two-factor-auth to use OVH SMS gateway

Project description

django_two_factor_auth_ovh_gateway

Plugin for django-two-factor-auth, adding a gateway for sending SMS using the OVH API.

All you need is your OVH API credentials and the name of the SMS account you want to use.

Setup

Please see the django-two-factor-auth documentation for instructions on how to set up two-factor authentication in your Django project.

OVH Setup

To use the OVH gateway, you need first to install this OVH plugin for django-two-factor-auth:

$ pip install django_two_factor_auth_ovh_gateway

Then, add the plugin to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    ...
    "django_two_factor_auth_ovh_gateway",
]

Finally, you need to add the OVH gateway to your TWO_FACTOR_SMS_GATEWAY setting:

TWO_FACTOR_SMS_GATEWAY = "django_two_factor_auth_ovh_gateway.gateway.Ovh"

Configuration

OVH_ENDPOINT (default: ovh-eu) The OVH API endpoint to use. See this list for available endpoints.

OVH_APPLICATION_KEY (required) The application key, provided by OVH.

OVH_APPLICATION_SECRET (required) The application secret, prodived by OVH.

OVH_CONSUMER_KEY (required) The consumer key, provided by OVH.

OVH_CLASS (default: phoneDisplay) The SMS class used by OVH to send the SMS. Possible values are flash, phoneDisplay, sim, toolkit.

OVH_CODING (default: 7bit) The SMS coding used by OVH to send the SMS. Possible values are 7bit, 8bit.

OVH_MESSAGE (default: Your token is {token}) The message template used by OVH to send the SMS. The {token} placeholder needs to be present, as it will be replaced by the actual token.

OVH_NO_STOP_CLAUSE (default: True) Whether to allow the user to stop receiving SMS by replying STOP to the SMS. If set to True, the user will not be able to stop receiving SMS.

OVH_PRIORITY (default: high) The SMS priority used by OVH to send the SMS. Possible values are high, low, medium, veryLow.

OVH_SENDER (default: OVH) The sender's name used by OVH to send the SMS. Can be the name of your app, or your company name.

OVH_SENDER_FOR_RESPONSE (default: False) Whether to allow the user to reply to the SMS. If set to True, the user will be able to reply to the SMS.

OVH_VALIDITY_PERIOD (default: 2880) The SMS validity time, in minutes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file django_two_factor_auth_ovh_gateway-0.0.3.tar.gz.

File metadata

File hashes

Hashes for django_two_factor_auth_ovh_gateway-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3568649593e2eb5f8872cae75f663f6036526b7980594fef1af3efb6da3d340a
MD5 36e1dcf0564ae0a3729222ba660edafe
BLAKE2b-256 a6d113dbf27ccc737f392b36a55da3d3c9802d6c626058dcba70b282548d4649

See more details on using hashes here.

File details

Details for the file django_two_factor_auth_ovh_gateway-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_two_factor_auth_ovh_gateway-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 39fb1eeeb2ea73bccf3deeeeec3d7479d2a4378a04e117329f6dcb9d56147e23
MD5 8bb97255956fc2ea2f5f213ef07848ca
BLAKE2b-256 73188e7506b6a77fe165c4e6ab48cd52d05c013b90a0dbfe2d3bbc4d51a7e362

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page