Coder Social home page Coder Social logo

drf-pyotp's People

Contributors

dependabot[bot] avatar elijahahianyo avatar inforian avatar veris-neerajdhiman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

drf-pyotp's Issues

use parameters in settings.py for defining expiry times for TOTP and HOTP

Hi, I was wondering if the application could use variables defined in the settings.py file of the external application(or using defaults set by the system) rather than specifying it when making requests.
For making requests for TOTP:

{
  "time": 0
}

and that of HOTP:

{
  "count": 0
}

could be represented by obtaining these values from the settings file as:

OTP_TIME_EXP = 300 #set the OTP expiry time to 300s
OTP_TYPE = 'totp' # sets the type of OTP(either TOTP or HOTP)

#for the case of HOTP
HOTP_COUNT = 5 #set the Hotp counter to 5

where obviously, default values can be set in the application in case these variables are not set in the external application.
I can go ahead and create aPR if this is approved

missing changelog

a changelog based on semantic versioning should be added to track versions of the system. preferably automated

missing CONTRIBUTING.md file

Hi, is this project still being maintained? Realised there hasn't been any activity in 3 years! However, would be happy to add a contributing.md for starters if given the go ahead to create a PR ๐Ÿ˜„

Quick fix to enable this package to work with Django 4 and the older versions

Hi There,
would it be possible to add this line of code within the below files. This helps with Django4.0 and would also work with the older version.

  1. "rest_pyotp/models.py"

From

from django.utils.translation import ugettext_lazy as _

To

try:
    from django.utils.translation import ugettext_lazy as _
except ImportError:
    from django.utils.translation import gettext_lazy as _
  1. "rest_pyotp/routers.py"

From

from django.conf.urls import url

To

try:
    from django.conf.urls import url
except ImportError:
    from django.urls import re_path as url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.