Update endpoints used for MFA operations#131
Merged
maxdeviant merged 9 commits intomainfrom Jul 15, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #131 +/- ##
==========================================
+ Coverage 93.24% 93.25% +0.01%
==========================================
Files 22 22
Lines 577 578 +1
==========================================
+ Hits 538 539 +1
Misses 39 39
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
mthadley
reviewed
Jul 7, 2022
workos/mfa.py
Outdated
| DeprecationWarning, | ||
| ) | ||
|
|
||
| params = { |
Contributor
There was a problem hiding this comment.
Given the differences between verify_factor and verify_challenge are...
- One has a
warnsince it is deprecated - The other uses the new
auth/challenges/{challenge_id}/verifyendpoint, but is otherwise backwards compatible
Can we define verify_factor in terms of verify_challenge until it is finally removed?
def verify_factor(
self,
authentication_challenge_id=None,
code=None,
):
"""
Verifies the one time password provided by the end-user.
Kwargs:
authentication_challenge_id (str) - The ID of the authentication challenge that provided the user the verification code.
code (str) - The verification code sent to and provided by the end user.
Returns: Dict containing the challenge factor details.
"""
warn(
"'verify_factor' is deprecated. Please use 'verify_challenge' instead.",
DeprecationWarning,
)
return self.verify_challenge(
authentication_challenge_id=autentication_challenge_id, code=code
)
Contributor
Author
There was a problem hiding this comment.
That's a good point.
I updated verify_factor to be implemented in terms of verify_challenge.
mthadley
reviewed
Jul 7, 2022
| @@ -127,6 +126,11 @@ def verify_factor( | |||
| Returns: Dict containing the challenge factor details. | |||
Contributor
There was a problem hiding this comment.
Should we also update the Docstring for verify_factor to mention that it is now deprecated?
…:workos-inc/workos-python into update-endpoints-used-for-mfa-operations
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the endpoints used for two of the MFA operations:
challenge_factorverify_challengeThe
verify_factormethod is now deprecated and has been replaced withverify_challenge.verify_factorwill be removed in the next major version.Resolves SDK-547.