-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new parameters in provisioning_uri (#33)
* Correct provisioning_uri method's output Added to the provisioning_uri method in HOTP and TOTP classes the ability to call the util's function build_uri with all the necessary arguments. Added to the function build_uri the ability to handle values different than the defaults for algorithm, digits and period when generating URI. * Make PEP-008 and lint errors corrections Made some corrections to pass the standard PEP-008 in all files. Corrected lint errors in docstring in utils' function build_uri. Also corrected an import error for python 2.x and indentation error in utils module. * Add test cases for new URI parameters Added the corresponding tests for the new URI generated parameters for both, HOTP and TOTP algorithms. Some earlier tests had to be reformed because now the URI parameters are encoded using urlencode instead of concatenating strings. The string generated by urlencode comes from a dictionary and dictionary items do not have a predefined order. Also corrected some PEP-008 issues.
- Loading branch information
Showing
6 changed files
with
170 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters