Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add preferred_client_mode to enroll_via_validate #3457

Merged
merged 3 commits into from Jan 18, 2023

Conversation

jona-samuel
Copy link
Contributor

No description provided.

@@ -542,6 +542,7 @@ def enroll_via_validate(cls, g, content, user_obj):
"type": token_obj.type,
"message": _("Please enter your new email address!")}
detail["multi_challenge"] = [chal]
detail.update({"preferred_client_mode": "interactive"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always use the constant: CLIENTMODE.INTERACTIVE,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@lukasmatusiewicz lukasmatusiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add preferred_client_mode to webauthntoken.py

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #3457 (4311338) into master (d77a313) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3457   +/-   ##
=======================================
  Coverage   95.78%   95.78%           
=======================================
  Files         170      170           
  Lines       23137    23137           
=======================================
  Hits        22161    22161           
  Misses        976      976           
Impacted Files Coverage Δ
privacyidea/api/validate.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jona-samuel
Copy link
Contributor Author

Add preferred_client_mode to webauthntoken.py

I'm not sure if I understand your request. Is there a fetcher to enrol webauthntoken via validate?

@lukasmatusiewicz
Copy link

I'm not sure if I understand your request. Is there a fetcher to enrol webauthntoken via validate?

Yeah, you're right, it is not possible to enroll webauthn via challenge.

Copy link
Member

@plettich plettich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this should work out of the box just by moving the preferred_client_mode decorator in front of the multichallenge_enroll_via_validate decorator:

@postpolicy(multichallenge_enroll_via_validate, request=request)

@plettich plettich dismissed cornelinux’s stale review January 18, 2023 18:41

code not used anymore

@plettich plettich merged commit ea9104f into master Jan 18, 2023
@plettich plettich deleted the 3429/Missing_preferred_client_mode_after_enrollment branch January 20, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing preferred_client_mode after validate-check-enrollment
4 participants