stages/authentiactor_validate: improve error handling for duo

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-07-28 20:57:29 +02:00
parent 1f90359310
commit 0248755cda
14 changed files with 180 additions and 87 deletions

View File

@ -55,6 +55,7 @@ export class AuthenticatorValidateStage
set selectedDeviceChallenge(value: DeviceChallenge | undefined) {
this._selectedDeviceChallenge = value;
if (!value) return;
if (value === this._selectedDeviceChallenge) return;
// We don't use this.submit here, as we don't want to advance the flow.
// We just want to notify the backend which challenge has been selected.
new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolve({

View File

@ -50,6 +50,7 @@ export class AuthenticatorValidateStageWebDuo extends BaseStage<
if (!this.challenge) {
return html`<ak-empty-state ?loading="${true}" header=${t`Loading`}> </ak-empty-state>`;
}
const errors = this.challenge.responseErrors?.duo || [];
return html`<div class="pf-c-login__main-body">
<form
class="pf-c-form"
@ -69,6 +70,10 @@ export class AuthenticatorValidateStageWebDuo extends BaseStage<
</div>
</ak-form-static>
${errors.map((err) => {
return html`<p>${err.string}</p>`;
})}
<div class="pf-c-form__group pf-m-action">
<button type="submit" class="pf-c-button pf-m-primary pf-m-block">
${t`Continue`}

View File

@ -2259,6 +2259,10 @@ msgstr "Felder"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "Felder, mit denen sich ein Benutzer identifizieren kann. Wenn keine Felder ausgewählt sind, kann der Benutzer nur Quellen verwenden."
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr ""

View File

@ -2295,6 +2295,10 @@ msgstr "Fields"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr "File"
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr "Finish"

View File

@ -2250,6 +2250,10 @@ msgstr "Campos"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "Campos con los que un usuario puede identificarse. Si no se seleccionan campos, el usuario solo podrá usar fuentes."
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr ""

View File

@ -2275,6 +2275,10 @@ msgstr "Champs"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "Champs avec lesquels un utilisateur peut s'identifier. Si aucun champ n'est sélectionné, l'utilisateur ne pourra utiliser que des sources."
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr ""

View File

@ -2247,6 +2247,10 @@ msgstr "Pola"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "Pola, z którymi użytkownik może się identyfikować. Jeśli żadne pola nie zostaną wybrane, użytkownik będzie mógł korzystać tylko ze źródeł."
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr ""

View File

@ -2281,6 +2281,10 @@ msgstr ""
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr ""
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr ""

View File

@ -2250,6 +2250,10 @@ msgstr "Alanlar"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "Kullanıcının kendilerini tanımlayabileceği alanlar. Herhangi bir alan seçilmezse, kullanıcı yalnızca kaynakları kullanabilir."
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr ""

View File

@ -2238,6 +2238,10 @@ msgstr "字段"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "用户可以用来标识自己的字段。如果未选择任何字段,则用户将只能使用源。"
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr "完成"

View File

@ -2241,6 +2241,10 @@ msgstr "字段"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "用户可以用来标识自己的字段。如果未选择任何字段,则用户将只能使用源。"
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr "完成"

View File

@ -2241,6 +2241,10 @@ msgstr "字段"
msgid "Fields a user can identify themselves with. If no fields are selected, the user will only be able to use sources."
msgstr "用户可以用来标识自己的字段。如果未选择任何字段,则用户将只能使用源。"
#: src/pages/stages/prompt/PromptForm.ts
msgid "File"
msgstr ""
#: src/elements/wizard/Wizard.ts
msgid "Finish"
msgstr "完成"