django_tfa

ภาพหน้าจอของซอฟแวร์:
django_tfa
รายละเอียดซอฟแวร์:
รุ่น: 0.1
วันที่อัพโหลด: 15 Apr 15
ผู้พัฒนา: Simone Lusenti
การอนุญาต: ฟรี
ความนิยม: 12

Rating: 2.0/5 (Total Votes: 1)

django_tfa เป็น app Django ที่ดำเนินการตรวจสอบสองปัจจัยขึ้นอยู่กับ contrib.auth Django ของ
อีกครั้งหนึ่งที่มีการใช้สัญญาณสร้างขึ้นโดยใช้ของ Tomasz onetimepass (https://github.com/tadeck/onetimepass) โมดูลนี้จะรวมอยู่ในการจัดจำหน่ายนี้ (ไฟล์: otp.py) Django_tfa ใช้ TOTPs (ตามเวลาหนึ่งเวลารหัสผ่าน) กับ Base32 เข้ารหัสลับ มันเข้ากันได้กับ Google Authenticator (ดาวน์โหลดได้จาก http://code.google.com/p/google-authenticator/) และอาจจะปพลิเคชันอื่น ๆ
การติดตั้ง
Devel:
โคลนคอมไพล์คอมไพล์: //github.com/lusentis/django_tfa.git
หลาม sudo setup.py ติดตั้ง
เสถียร:
sudo easy_install django_tfa
การตั้งค่า
1. เพิ่ม twofactor ลงในรายการ INSTALLED_APPS ของคุณ
& nbsp; INSTALLED_APPS = (... twofactor ', ... )
2. ฐานข้อมูลการซิงค์ (ตัวเลือกใช้งาน: ใช้ภาคใต้)
& nbsp; # ไม่มีใต้
& nbsp; ./ manage.py syncdb
& nbsp; # ใต้ (แนะนำ)
& nbsp; ./ manage.py schemamigration --initial twofactor
& nbsp; ./ manage.py syncdb
& nbsp; ./ manage.py โยกย้าย
1. เพิ่มการตั้งค่าบาง (ตัวเลือกเริ่มต้นมีการแสดง)
& nbsp; จาก twofactor.callbacks นำเข้า everyone_must_have_otp
& nbsp; TWOFACTOR_ENABLED_CALLBACK = everyone_must_have_otp
& nbsp; TWOFACTOR_ENABLE_AT_FIRST_LOGIN = True
& nbsp; TWOFACTOR_TOKEN_LENGTH = 32
1. เพิ่มเข้าสู่ระบบและออกจากระบบแม่แบบ (เช่นเดียวกับที่คุณใช้กับ contrib.auth)
2. เพิ่ม URL ของ twofactor เพื่อ urls.py รากของคุณ
& nbsp; url (R '^ เข้าระบบ / $', 'twofactor.views.login_view' {'template_name': 'login.html'},
& nbsp; name = 'เข้าสู่ระบบ'),
& nbsp; url (R '^ เข้าระบบ / TFA $', 'twofactor.views.login_twofactor' {'template_name': 'login_twofactor.html'},
& nbsp; name = 'login_twofactor'),
& nbsp; url (R '^ เข้าระบบ / TFA / เปิด $', 'twofactor.views.twofactor_enable',
& nbsp; name = 'login_twofactor_enable'),
คุณจะต้องแทนที่มีอยู่ของคุณ / เข้าสู่ระบบ / url จาก django.contrib.auth
1. เพิ่มผู้ใช้บางคนจากผู้ดูแลระบบ Django หรือเปลือก ./manage.py
บัก
- โพสต์เปลี่ยนเส้นทางเข้าสู่ระบบไม่ได้จัดการอย่างถูกต้องดังนั้นคุณควรได้ URLPATTERN ชื่อ "บ้าน" ที่เป็นที่ที่คุณต้องการที่จะ reidrected หลังจากเข้าสู่ระบบ
- ใส่ URL ที่ twofactor ในแฟ้มแยกต่างหาก (เช่น twofactor.urls) แบ่งฟังก์ชั่น urlconf ย้อนกลับ ... ทำไม?

ตัวอย่าง

โคลน repo นี้และเรียกใช้:
./manage.py syncdb
./manage.py runserver
และชี้เบราว์เซอร์ของคุณ http: // localhost: 8000

ต้องการ

  • หลาม
  • Django

ซอฟแวร์อื่น ๆ ของนักพัฒนา Simone Lusenti

ความคิดเห็นที่ django_tfa

ความคิดเห็นที่ไม่พบ
เพิ่มความคิดเห็น
เปิดภาพ!