stages/authenticator_validate: add flag to configure user_verification for webauthn devices
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		| @ -1,4 +1,5 @@ | ||||
| import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; | ||||
| import { first } from "@goauthentik/common/utils"; | ||||
| import "@goauthentik/elements/forms/FormGroup"; | ||||
| import "@goauthentik/elements/forms/HorizontalFormElement"; | ||||
| import { ModelForm } from "@goauthentik/elements/forms/ModelForm"; | ||||
| @ -16,6 +17,7 @@ import { | ||||
|     DeviceClassesEnum, | ||||
|     NotConfiguredActionEnum, | ||||
|     StagesApi, | ||||
|     UserVerificationEnum, | ||||
| } from "@goauthentik/api"; | ||||
|  | ||||
| @customElement("ak-stage-authenticator-validate-form") | ||||
| @ -182,6 +184,35 @@ export class AuthenticatorValidateStageForm extends ModelForm<AuthenticatorValid | ||||
|                             </option> | ||||
|                         </select> | ||||
|                     </ak-form-element-horizontal> | ||||
|                     <ak-form-element-horizontal | ||||
|                         label=${t`WebAuthn User verification`} | ||||
|                         ?required=${true} | ||||
|                         name="webauthnUserVerification" | ||||
|                     > | ||||
|                         <select class="pf-c-form-control"> | ||||
|                             <option | ||||
|                                 value="${UserVerificationEnum.Required}" | ||||
|                                 ?selected=${this.instance?.webauthnUserVerification === | ||||
|                                 UserVerificationEnum.Required} | ||||
|                             > | ||||
|                                 ${t`User verification must occur.`} | ||||
|                             </option> | ||||
|                             <option | ||||
|                                 value="${UserVerificationEnum.Preferred}" | ||||
|                                 ?selected=${this.instance?.webauthnUserVerification === | ||||
|                                 UserVerificationEnum.Preferred} | ||||
|                             > | ||||
|                                 ${t`User verification is preferred if available, but not required.`} | ||||
|                             </option> | ||||
|                             <option | ||||
|                                 value="${UserVerificationEnum.Discouraged}" | ||||
|                                 ?selected=${this.instance?.webauthnUserVerification === | ||||
|                                 UserVerificationEnum.Discouraged} | ||||
|                             > | ||||
|                                 ${t`User verification should not occur.`} | ||||
|                             </option> | ||||
|                         </select> | ||||
|                     </ak-form-element-horizontal> | ||||
|                     ${this.showConfigurationStages | ||||
|                         ? html` | ||||
|                               <ak-form-element-horizontal | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer