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

9 translate the preferred client mode names #10

Merged
merged 15 commits into from
Jan 11, 2023
10 changes: 9 additions & 1 deletion PrivacyIDEA_Client/PIResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ public List<string> WebAuthnSignRequests()

if (jobj["detail"] is JToken detail && detail.Type is not JTokenType.Null)
{
if ((string?)detail["preferred_client_mode"] is string prefClientMode)
if ((string?)detail["preferred_client_mode"] == "poll")
{
ret.PreferredClientMode = "push";
}
else if ((string?)detail["preferred_client_mode"] == "interactive")
{
ret.PreferredClientMode = "otp";
}
else if ((string?)detail["preferred_client_mode"] is string prefClientMode)
{
ret.PreferredClientMode = prefClientMode;
}
Expand Down
Loading