Merge lp:~michael.nelson/canonical-identity-provider/add_otp_form_field into lp:canonical-identity-provider/release
Proposed by
Michael Nelson
Status: | Merged |
---|---|
Approved by: | Michael Foord |
Approved revision: | no longer in the source branch. |
Merged at revision: | 143 |
Proposed branch: | lp:~michael.nelson/canonical-identity-provider/add_otp_form_field |
Merge into: | lp:canonical-identity-provider/release |
Diff against target: |
201 lines (+168/-3) 2 files modified
identityprovider/fields.py (+63/-2) identityprovider/tests/test_fields.py (+105/-1) |
To merge this branch: | bzr merge lp:~michael.nelson/canonical-identity-provider/add_otp_form_field |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Foord (community) | Approve | ||
Review via email: mp+60507@code.launchpad.net |
Commit message
[r=mfoord] Add a new django form field: OneTimePassword
Description of the change
Overview
========
This branch provides a django form field, OneTimePassword
1) Ensure the length of the otp is between 34-40, and if so,
2) Verify with an actual Yubikey server that the otp is valid.
If either of the above is not true, as per normal django fields, it raises a validation error. It's written to be plugged in to the LoginForm and the NewYubiKeyForm.
Test with:
$ .env/bin/python django_
To post a comment you must log in.
Great stuff.