2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="2faU2fTitle">
|
2019-10-11 17:47:41 +02:00
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
2018-06-27 23:50:31 +02:00
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2019-10-11 17:47:41 +02:00
|
|
|
<h2 class="modal-title" id="2faU2fTitle">
|
2018-06-27 23:50:31 +02:00
|
|
|
{{ "twoStepLogin" | i18n }}
|
2021-03-16 17:44:31 +01:00
|
|
|
<small>{{ "webAuthnTitle" | i18n }}</small>
|
2018-06-27 23:50:31 +02:00
|
|
|
</h2>
|
2019-10-11 17:22:21 +02:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="close"
|
|
|
|
data-dismiss="modal"
|
|
|
|
appA11yTitle="{{ 'close' | i18n }}"
|
|
|
|
>
|
2018-06-27 23:50:31 +02:00
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2019-02-21 22:50:37 +01:00
|
|
|
<app-two-factor-verify
|
|
|
|
[organizationId]="organizationId"
|
|
|
|
[type]="type"
|
|
|
|
(onAuthed)="auth($event)"
|
|
|
|
*ngIf="!authed"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2018-06-28 05:55:50 +02:00
|
|
|
</app-two-factor-verify>
|
2021-12-17 15:57:11 +01:00
|
|
|
<form
|
|
|
|
#form
|
2018-06-27 23:50:31 +02:00
|
|
|
(ngSubmit)="submit()"
|
|
|
|
[appApiAction]="formPromise"
|
|
|
|
ngNativeValidate
|
|
|
|
*ngIf="authed"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2018-06-27 23:50:31 +02:00
|
|
|
<div class="modal-body">
|
|
|
|
<app-callout
|
|
|
|
type="success"
|
|
|
|
title="{{ 'enabled' | i18n }}"
|
2022-01-27 18:25:58 +01:00
|
|
|
icon="bwi bwi-check-circle"
|
2018-06-27 23:50:31 +02:00
|
|
|
*ngIf="enabled"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2018-06-27 23:50:31 +02:00
|
|
|
{{ "twoStepLoginProviderEnabled" | i18n }}
|
|
|
|
</app-callout>
|
|
|
|
<app-callout type="warning">
|
2021-03-16 17:44:31 +01:00
|
|
|
<p>{{ "twoFactorWebAuthnWarning" | i18n }}</p>
|
2018-06-27 23:50:31 +02:00
|
|
|
<ul class="mb-0">
|
2021-03-16 17:44:31 +01:00
|
|
|
<li>{{ "twoFactorWebAuthnSupportWeb" | i18n }}</li>
|
2021-12-17 15:57:11 +01:00
|
|
|
</ul>
|
2018-06-27 23:50:31 +02:00
|
|
|
</app-callout>
|
2021-10-08 00:47:32 +02:00
|
|
|
<img class="float-right ml-5 mfaType7" alt="FIDO2 WebAuthn logo'" />
|
2022-01-27 18:25:58 +01:00
|
|
|
<ul class="bwi-ul">
|
2021-12-17 15:57:11 +01:00
|
|
|
<li
|
2018-10-08 20:23:30 +02:00
|
|
|
*ngFor="let k of keys; let i = index"
|
|
|
|
#removeKeyBtn
|
|
|
|
[appApiAction]="k.removePromise"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-li bwi-key"></i>
|
2021-03-16 17:44:31 +01:00
|
|
|
<strong *ngIf="!k.configured || !k.name">{{ "webAuthnkeyX" | i18n: i + 1 }}</strong>
|
2018-10-08 20:23:30 +02:00
|
|
|
<strong *ngIf="k.configured && k.name">{{ k.name }}</strong>
|
2019-10-11 16:35:24 +02:00
|
|
|
<ng-container *ngIf="k.configured && !removeKeyBtn.loading">
|
2021-03-16 17:44:31 +01:00
|
|
|
<ng-container *ngIf="k.migrated">
|
|
|
|
<span>{{ "webAuthnMigrated" | i18n }}</span>
|
2018-10-08 20:23:30 +02:00
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="keysConfiguredCount > 1 && k.configured">
|
2021-12-17 15:57:11 +01:00
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-spin bwi-spinner text-muted bwi-fw"
|
2019-02-21 22:50:37 +01:00
|
|
|
title="{{ 'loading' | i18n }}"
|
2019-10-11 16:35:24 +02:00
|
|
|
*ngIf="removeKeyBtn.loading"
|
2019-10-11 17:22:21 +02:00
|
|
|
aria-hidden="true"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
|
|
|
-
|
2018-10-08 20:23:30 +02:00
|
|
|
<a href="#" appStopClick (click)="remove(k)">{{ "remove" | i18n }}</a>
|
|
|
|
</ng-container>
|
2021-12-17 15:57:11 +01:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<hr />
|
2021-03-16 17:44:31 +01:00
|
|
|
<p>{{ "twoFactorWebAuthnAdd" | i18n }}:</p>
|
2021-12-17 15:57:11 +01:00
|
|
|
<ol>
|
2018-10-08 20:23:30 +02:00
|
|
|
<li>{{ "twoFactorU2fGiveName" | i18n }}</li>
|
|
|
|
<li>{{ "twoFactorU2fPlugInReadKey" | i18n }}</li>
|
|
|
|
<li>{{ "twoFactorU2fTouchButton" | i18n }}</li>
|
|
|
|
<li>{{ "twoFactorU2fSaveForm" | i18n }}</li>
|
2021-12-17 15:57:11 +01:00
|
|
|
</ol>
|
2018-10-08 20:23:30 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-6">
|
|
|
|
<label for="name">{{ "name" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-02-21 22:50:37 +01:00
|
|
|
id="name"
|
|
|
|
type="text"
|
|
|
|
name="Name"
|
|
|
|
class="form-control"
|
|
|
|
[(ngModel)]="name"
|
2021-03-16 17:44:31 +01:00
|
|
|
[disabled]="!keyIdAvailable"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2018-06-27 23:50:31 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2019-02-21 22:50:37 +01:00
|
|
|
<button
|
|
|
|
type="button"
|
2018-06-27 23:50:31 +02:00
|
|
|
(click)="readKey()"
|
|
|
|
class="btn btn-outline-secondary mr-2"
|
2021-10-08 00:47:32 +02:00
|
|
|
[disabled]="readKeyBtn.loading || webAuthnListening || !keyIdAvailable"
|
2018-10-08 20:23:30 +02:00
|
|
|
#readKeyBtn
|
|
|
|
[appApiAction]="challengePromise"
|
2021-03-16 17:44:31 +01:00
|
|
|
>
|
|
|
|
{{ "readKey" | i18n }}
|
2019-10-11 16:35:24 +02:00
|
|
|
</button>
|
2018-10-08 20:23:30 +02:00
|
|
|
<ng-container *ngIf="readKeyBtn.loading">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-spinner bwi-spin text-muted" aria-hidden="true"></i>
|
2019-02-21 22:50:37 +01:00
|
|
|
</ng-container>
|
2018-10-08 20:23:30 +02:00
|
|
|
<ng-container *ngIf="!readKeyBtn.loading">
|
2021-03-16 17:44:31 +01:00
|
|
|
<ng-container *ngIf="webAuthnListening">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-spinner bwi-spin text-muted" aria-hidden="true"></i>
|
2018-10-08 20:23:30 +02:00
|
|
|
{{ "twoFactorU2fWaiting" | i18n }}...
|
|
|
|
</ng-container>
|
2021-03-16 17:44:31 +01:00
|
|
|
<ng-container *ngIf="webAuthnResponse">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-check-circle text-success" aria-hidden="true"></i>
|
2018-10-08 20:23:30 +02:00
|
|
|
{{ "twoFactorU2fClickSave" | i18n }}
|
|
|
|
</ng-container>
|
2021-03-16 17:44:31 +01:00
|
|
|
<ng-container *ngIf="webAuthnError">
|
2022-01-27 18:25:58 +01:00
|
|
|
<i class="bwi bwi-exclamation-triangle text-danger" aria-hidden="true"></i>
|
2019-10-11 16:35:24 +02:00
|
|
|
{{ "twoFactorU2fProblemReadingTryAgain" | i18n }}
|
|
|
|
</ng-container>
|
2019-02-21 22:50:37 +01:00
|
|
|
</ng-container>
|
2018-06-27 23:50:31 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2021-03-16 17:44:31 +01:00
|
|
|
type="submit"
|
|
|
|
class="btn btn-primary"
|
|
|
|
[disabled]="form.loading || !webAuthnResponse"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-spinner bwi-spin"
|
2019-10-11 16:35:24 +02:00
|
|
|
*ngIf="form.loading"
|
2019-02-21 22:50:37 +01:00
|
|
|
title="{{ 'loading' | i18n }}"
|
2019-10-11 17:22:21 +02:00
|
|
|
aria-hidden="true"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
2018-10-08 20:23:30 +02:00
|
|
|
<span *ngIf="!form.loading">{{ "save" | i18n }}</span>
|
2018-06-27 23:50:31 +02:00
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2019-02-21 22:50:37 +01:00
|
|
|
#disableBtn
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-secondary btn-submit"
|
|
|
|
[appApiAction]="disablePromise"
|
|
|
|
[disabled]="disableBtn.loading"
|
|
|
|
(click)="disable()"
|
2018-06-27 23:50:31 +02:00
|
|
|
*ngIf="enabled"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2022-01-27 18:25:58 +01:00
|
|
|
<i
|
|
|
|
class="bwi bwi-spinner bwi-spin"
|
|
|
|
title="{{ 'loading' | i18n }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
></i>
|
2018-10-08 20:23:30 +02:00
|
|
|
<span>{{ "disableAllKeys" | i18n }}</span>
|
2018-06-27 23:50:31 +02:00
|
|
|
</button>
|
2019-02-21 22:50:37 +01:00
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
|
|
{{ "close" | i18n }}
|
2018-06-27 23:50:31 +02:00
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
2018-06-27 23:50:31 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-27 23:50:31 +02:00
|
|
|
</div>
|