@newheap/platform-common 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/fesm2022/newheap-platform-common-two-factor.mjs +896 -0
- package/fesm2022/newheap-platform-common-two-factor.mjs.map +1 -0
- package/fesm2022/newheap-platform-common.mjs +867 -11
- package/fesm2022/newheap-platform-common.mjs.map +1 -1
- package/index.d.ts +401 -3
- package/package.json +18 -11
- package/two-factor/i18n/en.json +93 -0
- package/two-factor/i18n/nl.json +93 -0
- package/two-factor/index.d.ts +261 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nh-two-factor": {
|
|
3
|
+
"required": "Voer een code in om het aanmelden af te ronden.",
|
|
4
|
+
"enrollment-required": "Stel tweestapsverificatie in om verder te gaan.",
|
|
5
|
+
"invalid-code": "De code is ongeldig. Probeer de volgende code.",
|
|
6
|
+
"challenge-expired": "De aanmelding is verlopen. Meld je opnieuw aan.",
|
|
7
|
+
"locked-out": "Te veel pogingen. Het account is tijdelijk geblokkeerd.",
|
|
8
|
+
"method-not-allowed": "Deze methode kan niet voor dit account worden gebruikt.",
|
|
9
|
+
"not-enabled": "Tweestapsverificatie staat niet aan.",
|
|
10
|
+
"already-enabled": "Tweestapsverificatie staat al aan.",
|
|
11
|
+
"setup-not-started": "Start eerst het instellen.",
|
|
12
|
+
"reauthentication-required": "Bevestig je wachtwoord of een code om door te gaan.",
|
|
13
|
+
"reauthentication-failed": "Het wachtwoord of de code klopt niet.",
|
|
14
|
+
"required-by-policy": "Je organisatie vereist tweestapsverificatie.",
|
|
15
|
+
"not-allowed-while-impersonating": "Je kunt tweestapsverificatie niet wijzigen tijdens impersonatie.",
|
|
16
|
+
"configuration-invalid": "Tweestapsverificatie is niet goed geconfigureerd.",
|
|
17
|
+
"email-cooldown": "Wacht even voordat je een nieuwe code aanvraagt.",
|
|
18
|
+
"email-unavailable": "Er is geen bevestigd e-mailadres beschikbaar.",
|
|
19
|
+
"user-not-found": "De gebruiker is niet gevonden.",
|
|
20
|
+
"passkey-invalid": "De passkey kon niet worden gecontroleerd.",
|
|
21
|
+
"passkey-not-found": "De passkey is niet gevonden.",
|
|
22
|
+
"passkey-unavailable": "De passkey-vraag is geannuleerd, of deze browser ondersteunt geen passkeys.",
|
|
23
|
+
"ui": {
|
|
24
|
+
"error": "Er ging iets mis. Probeer het opnieuw.",
|
|
25
|
+
"challenge-title": "Tweestapsverificatie",
|
|
26
|
+
"settings-title": "Tweestapsverificatie",
|
|
27
|
+
"enrollment-title": "Tweestapsverificatie instellen",
|
|
28
|
+
"enrollment-instructions": "Je organisatie vereist een tweede stap bij het aanmelden. Kies hoe je wilt bevestigen dat jij het bent.",
|
|
29
|
+
"method-label": "Verificatiemethode",
|
|
30
|
+
"method": {
|
|
31
|
+
"authenticator": "Authenticator-app",
|
|
32
|
+
"recovery-code": "Herstelcode",
|
|
33
|
+
"email": "E-mailcode",
|
|
34
|
+
"passkey": "Passkey"
|
|
35
|
+
},
|
|
36
|
+
"code-label": {
|
|
37
|
+
"authenticator": "Code uit je authenticator-app",
|
|
38
|
+
"recovery-code": "Herstelcode",
|
|
39
|
+
"email": "Code uit de e-mail"
|
|
40
|
+
},
|
|
41
|
+
"verify": "Controleren",
|
|
42
|
+
"verifying": "Bezig met controleren…",
|
|
43
|
+
"cancel": "Annuleren",
|
|
44
|
+
"remember-device": "Dit apparaat onthouden",
|
|
45
|
+
"send-email-code": "Stuur mij een code",
|
|
46
|
+
"resend-email-code": "Stuur een nieuwe code",
|
|
47
|
+
"email-code-sent": "We hebben een code gemaild. De code verloopt om {{time}}.",
|
|
48
|
+
"use-passkey": "Passkey gebruiken",
|
|
49
|
+
"passkey-verify-instructions": "Je browser vraagt je te bevestigen met een passkey op dit apparaat, je telefoon of een beveiligingssleutel.",
|
|
50
|
+
"sign-in-with-passkey": "Aanmelden met een passkey",
|
|
51
|
+
"authenticator-instructions": "Scan de QR-code met je authenticator-app, of voer de sleutel handmatig in. Voer daarna de code in die de app toont.",
|
|
52
|
+
"shared-key": "Sleutel",
|
|
53
|
+
"qr-code-alt": "QR-code voor je authenticator-app",
|
|
54
|
+
"confirm": "Bevestigen",
|
|
55
|
+
"email-instructions": "We sturen een code naar je bevestigde e-mailadres.",
|
|
56
|
+
"passkey-instructions": "Maak een passkey met de schermvergrendeling van dit apparaat, een wachtwoordmanager of een beveiligingssleutel.",
|
|
57
|
+
"passkey-name": "Naam van de passkey",
|
|
58
|
+
"create-passkey": "Passkey maken",
|
|
59
|
+
"recovery-codes-title": "Herstelcodes",
|
|
60
|
+
"recovery-codes-instructions": "Bewaar deze codes op een veilige plek. Met elke code kun je je één keer aanmelden als je je andere methodes niet kunt gebruiken. Ze worden alleen nu getoond.",
|
|
61
|
+
"copy": "Kopiëren",
|
|
62
|
+
"copied": "Gekopieerd",
|
|
63
|
+
"download": "Downloaden",
|
|
64
|
+
"recovery-codes-saved": "Ik heb deze codes bewaard",
|
|
65
|
+
"continue": "Doorgaan",
|
|
66
|
+
"loading": "Laden…",
|
|
67
|
+
"status-enabled": "Aan",
|
|
68
|
+
"status-disabled": "Uit",
|
|
69
|
+
"status-required": "Vereist door je organisatie",
|
|
70
|
+
"recovery-codes-left": "Nog {{count}} herstelcodes",
|
|
71
|
+
"set-up-authenticator": "Authenticator-app instellen",
|
|
72
|
+
"change-authenticator": "Authenticator-app wijzigen",
|
|
73
|
+
"set-up-email": "E-mailcodes gebruiken",
|
|
74
|
+
"passkeys-title": "Passkeys",
|
|
75
|
+
"no-passkeys": "Nog geen passkeys.",
|
|
76
|
+
"add-passkey": "Passkey toevoegen",
|
|
77
|
+
"rename": "Naam wijzigen",
|
|
78
|
+
"save": "Opslaan",
|
|
79
|
+
"remove": "Verwijderen",
|
|
80
|
+
"passkey-created": "Toegevoegd op {{date}}",
|
|
81
|
+
"passkey-synced": "Gesynchroniseerd",
|
|
82
|
+
"regenerate-recovery-codes": "Nieuwe herstelcodes maken",
|
|
83
|
+
"forget-devices": "Onthouden apparaten vergeten",
|
|
84
|
+
"disable": "Tweestapsverificatie uitzetten",
|
|
85
|
+
"reauthentication-title": "Bevestig dat jij het bent",
|
|
86
|
+
"reauthentication-method": "Bevestigen met",
|
|
87
|
+
"password": "Wachtwoord",
|
|
88
|
+
"devices-forgotten": "Elk apparaat vraagt weer om de tweede stap.",
|
|
89
|
+
"session-renewed": "Je andere sessies zijn afgemeld.",
|
|
90
|
+
"change-saved": "Je wijziging is opgeslagen."
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import * as _newheap_platform_common from '@newheap/platform-common';
|
|
4
|
+
import { TaskResult, NhTwoFactorChallenge, INhAuthorization, NhTwoFactorEmailCodeSent, NhTwoFactorEnrollmentResult, NhAuthenticatorSetup, NhTwoFactorStatus, NhPasskey, NhAuthenticationStep } from '@newheap/platform-common';
|
|
5
|
+
import { TranslationObject } from '@ngx-translate/core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns the translation keys for a failed two-factor result. Two-factor failure codes map
|
|
9
|
+
* to `nh-two-factor.<suffix>`; other failures use a generic message.
|
|
10
|
+
*/
|
|
11
|
+
declare function nhTwoFactorErrorKeys(result: TaskResult<unknown>): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Whether the server ended the pending sign-in step, so the user has to sign in again.
|
|
14
|
+
*/
|
|
15
|
+
declare function nhTwoFactorStepEnded(result: TaskResult<unknown>): boolean;
|
|
16
|
+
/** Reads the value of the input that raised an event. */
|
|
17
|
+
declare function nhTwoFactorInputValue(event: Event): string;
|
|
18
|
+
/** Reads the checked state of the checkbox that raised an event. */
|
|
19
|
+
declare function nhTwoFactorInputChecked(event: Event): boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Completes a second-factor challenge with a code, an e-mailed code, a recovery code or a
|
|
23
|
+
* passkey. The session is stored by the auth service before `authenticated` emits.
|
|
24
|
+
*/
|
|
25
|
+
declare class NhTwoFactorChallengeComponent {
|
|
26
|
+
private readonly auth;
|
|
27
|
+
private readonly injector;
|
|
28
|
+
private readonly codeInput;
|
|
29
|
+
/** The pending challenge from the login response. */
|
|
30
|
+
readonly challenge: _angular_core.InputSignal<NhTwoFactorChallenge>;
|
|
31
|
+
/** Whether to offer "remember this device" when the server allows it for this challenge. */
|
|
32
|
+
readonly allowRememberDevice: _angular_core.InputSignal<boolean>;
|
|
33
|
+
readonly authenticated: _angular_core.OutputEmitterRef<INhAuthorization>;
|
|
34
|
+
/** The challenge expired or the account was locked; the user has to sign in again. */
|
|
35
|
+
readonly expired: _angular_core.OutputEmitterRef<void>;
|
|
36
|
+
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly passkeySupported: boolean;
|
|
39
|
+
readonly selectedMethod: _angular_core.WritableSignal<string | null>;
|
|
40
|
+
readonly code: _angular_core.WritableSignal<string>;
|
|
41
|
+
readonly rememberDevice: _angular_core.WritableSignal<boolean>;
|
|
42
|
+
readonly busy: _angular_core.WritableSignal<boolean>;
|
|
43
|
+
readonly errorKeys: _angular_core.WritableSignal<string[]>;
|
|
44
|
+
readonly emailSent: _angular_core.WritableSignal<NhTwoFactorEmailCodeSent | null>;
|
|
45
|
+
readonly methods: _angular_core.Signal<string[]>;
|
|
46
|
+
readonly method: _angular_core.Signal<string>;
|
|
47
|
+
readonly usesCode: _angular_core.Signal<boolean>;
|
|
48
|
+
readonly numericCode: _angular_core.Signal<boolean>;
|
|
49
|
+
readonly offerRememberDevice: _angular_core.Signal<boolean>;
|
|
50
|
+
readonly value: typeof nhTwoFactorInputValue;
|
|
51
|
+
readonly checked: typeof nhTwoFactorInputChecked;
|
|
52
|
+
constructor();
|
|
53
|
+
selectMethod(method: string): void;
|
|
54
|
+
verify(): Promise<void>;
|
|
55
|
+
sendEmailCode(): Promise<void>;
|
|
56
|
+
private run;
|
|
57
|
+
private fail;
|
|
58
|
+
private defaultMethod;
|
|
59
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhTwoFactorChallengeComponent, never>;
|
|
60
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhTwoFactorChallengeComponent, "nh-two-factor-challenge", never, { "challenge": { "alias": "challenge"; "required": true; "isSignal": true; }; "allowRememberDevice": { "alias": "allowRememberDevice"; "required": false; "isSignal": true; }; }, { "authenticated": "authenticated"; "expired": "expired"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Enrolls a second factor for a user whom the policy requires to use one, during sign-in.
|
|
65
|
+
* The session is stored by the auth service; `completed` emits after the user saved the
|
|
66
|
+
* recovery codes.
|
|
67
|
+
*/
|
|
68
|
+
declare class NhTwoFactorEnrollmentComponent implements OnInit {
|
|
69
|
+
private readonly auth;
|
|
70
|
+
private readonly injector;
|
|
71
|
+
private readonly codeInput;
|
|
72
|
+
/** The enrollment step from the login response (status `enrollment-required`). */
|
|
73
|
+
readonly enrollment: _angular_core.InputSignal<NhTwoFactorChallenge>;
|
|
74
|
+
readonly completed: _angular_core.OutputEmitterRef<NhTwoFactorEnrollmentResult<_newheap_platform_common.INhAuthorization>>;
|
|
75
|
+
/** The enrollment expired or the account was locked; the user has to sign in again. */
|
|
76
|
+
readonly expired: _angular_core.OutputEmitterRef<void>;
|
|
77
|
+
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
78
|
+
readonly id: string;
|
|
79
|
+
readonly passkeySupported: boolean;
|
|
80
|
+
readonly selectedMethod: _angular_core.WritableSignal<string | null>;
|
|
81
|
+
readonly setup: _angular_core.WritableSignal<NhAuthenticatorSetup | null>;
|
|
82
|
+
readonly emailSent: _angular_core.WritableSignal<NhTwoFactorEmailCodeSent | null>;
|
|
83
|
+
readonly code: _angular_core.WritableSignal<string>;
|
|
84
|
+
readonly passkeyName: _angular_core.WritableSignal<string>;
|
|
85
|
+
readonly busy: _angular_core.WritableSignal<boolean>;
|
|
86
|
+
readonly errorKeys: _angular_core.WritableSignal<string[]>;
|
|
87
|
+
readonly result: _angular_core.WritableSignal<NhTwoFactorEnrollmentResult<_newheap_platform_common.INhAuthorization> | null>;
|
|
88
|
+
readonly methods: _angular_core.Signal<string[]>;
|
|
89
|
+
readonly method: _angular_core.Signal<string>;
|
|
90
|
+
readonly value: typeof nhTwoFactorInputValue;
|
|
91
|
+
constructor();
|
|
92
|
+
ngOnInit(): void;
|
|
93
|
+
selectMethod(method: string): void;
|
|
94
|
+
startAuthenticator(): Promise<void>;
|
|
95
|
+
sendEmailCode(): Promise<void>;
|
|
96
|
+
confirm(): Promise<void>;
|
|
97
|
+
/** Emits the result after the user saved the recovery codes. */
|
|
98
|
+
finish(): void;
|
|
99
|
+
private complete;
|
|
100
|
+
private run;
|
|
101
|
+
private token;
|
|
102
|
+
private focusCode;
|
|
103
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhTwoFactorEnrollmentComponent, never>;
|
|
104
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhTwoFactorEnrollmentComponent, "nh-two-factor-enrollment", never, { "enrollment": { "alias": "enrollment"; "required": true; "isSignal": true; }; }, { "completed": "completed"; "expired": "expired"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Shows recovery codes once, with copy and download actions. The user confirms that the
|
|
109
|
+
* codes were saved before continuing.
|
|
110
|
+
*/
|
|
111
|
+
declare class NhTwoFactorRecoveryCodesComponent {
|
|
112
|
+
readonly codes: _angular_core.InputSignal<readonly string[]>;
|
|
113
|
+
/** File name of the downloaded codes. */
|
|
114
|
+
readonly fileName: _angular_core.InputSignal<string>;
|
|
115
|
+
readonly acknowledged: _angular_core.OutputEmitterRef<void>;
|
|
116
|
+
readonly id: string;
|
|
117
|
+
readonly saved: _angular_core.WritableSignal<boolean>;
|
|
118
|
+
readonly copied: _angular_core.WritableSignal<boolean>;
|
|
119
|
+
readonly checked: typeof nhTwoFactorInputChecked;
|
|
120
|
+
constructor();
|
|
121
|
+
copy(): Promise<void>;
|
|
122
|
+
download(): void;
|
|
123
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhTwoFactorRecoveryCodesComponent, never>;
|
|
124
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhTwoFactorRecoveryCodesComponent, "nh-two-factor-recovery-codes", never, { "codes": { "alias": "codes"; "required": true; "isSignal": true; }; "fileName": { "alias": "fileName"; "required": false; "isSignal": true; }; }, { "acknowledged": "acknowledged"; }, never, never, true, never>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** A change on the settings page; some need reauthentication before they run. */
|
|
128
|
+
type NhTwoFactorSettingsAction = {
|
|
129
|
+
kind: 'authenticator';
|
|
130
|
+
} | {
|
|
131
|
+
kind: 'email';
|
|
132
|
+
} | {
|
|
133
|
+
kind: 'recovery-codes';
|
|
134
|
+
} | {
|
|
135
|
+
kind: 'forget-devices';
|
|
136
|
+
} | {
|
|
137
|
+
kind: 'disable';
|
|
138
|
+
} | {
|
|
139
|
+
kind: 'add-passkey';
|
|
140
|
+
} | {
|
|
141
|
+
kind: 'remove-passkey';
|
|
142
|
+
passkeyId: string;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Two-factor settings of the signed-in user: authenticator app, e-mail codes, passkeys,
|
|
146
|
+
* recovery codes, remembered devices and turning two-factor authentication off. Sensitive
|
|
147
|
+
* changes ask for the password or a code first.
|
|
148
|
+
*/
|
|
149
|
+
declare class NhTwoFactorSettingsComponent implements OnInit {
|
|
150
|
+
private readonly auth;
|
|
151
|
+
private readonly injector;
|
|
152
|
+
private readonly reauthenticationInput;
|
|
153
|
+
private readonly codeInput;
|
|
154
|
+
/** Reauthentication of a running e-mail setup, reused when the user requests a new code. */
|
|
155
|
+
private emailReauthentication?;
|
|
156
|
+
/** Whether the title is visible. Hosts with their own heading hide it; screen readers keep it. */
|
|
157
|
+
readonly showTitle: _angular_core.InputSignal<boolean>;
|
|
158
|
+
/** Emits the reloaded status after every saved change. */
|
|
159
|
+
readonly changed: _angular_core.OutputEmitterRef<NhTwoFactorStatus>;
|
|
160
|
+
readonly id: string;
|
|
161
|
+
readonly passkeySupported: boolean;
|
|
162
|
+
readonly status: _angular_core.WritableSignal<NhTwoFactorStatus | null>;
|
|
163
|
+
readonly passkeys: _angular_core.WritableSignal<NhPasskey[]>;
|
|
164
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
165
|
+
readonly busy: _angular_core.WritableSignal<boolean>;
|
|
166
|
+
readonly errorKeys: _angular_core.WritableSignal<string[]>;
|
|
167
|
+
readonly noticeKey: _angular_core.WritableSignal<string | null>;
|
|
168
|
+
readonly setupPanel: _angular_core.WritableSignal<"authenticator" | "email" | null>;
|
|
169
|
+
readonly setup: _angular_core.WritableSignal<NhAuthenticatorSetup | null>;
|
|
170
|
+
readonly emailSent: _angular_core.WritableSignal<NhTwoFactorEmailCodeSent | null>;
|
|
171
|
+
readonly code: _angular_core.WritableSignal<string>;
|
|
172
|
+
readonly recoveryCodes: _angular_core.WritableSignal<string[] | null>;
|
|
173
|
+
readonly pendingAction: _angular_core.WritableSignal<NhTwoFactorSettingsAction | null>;
|
|
174
|
+
readonly reauthenticationMethod: _angular_core.WritableSignal<string>;
|
|
175
|
+
readonly reauthenticationSecret: _angular_core.WritableSignal<string>;
|
|
176
|
+
readonly newPasskeyName: _angular_core.WritableSignal<string>;
|
|
177
|
+
readonly renamingId: _angular_core.WritableSignal<string | null>;
|
|
178
|
+
readonly renameValue: _angular_core.WritableSignal<string>;
|
|
179
|
+
readonly enabled: _angular_core.Signal<boolean>;
|
|
180
|
+
readonly required: _angular_core.Signal<boolean>;
|
|
181
|
+
readonly hasAuthenticator: _angular_core.Signal<boolean>;
|
|
182
|
+
readonly hasEmail: _angular_core.Signal<boolean>;
|
|
183
|
+
readonly authenticatorAvailable: _angular_core.Signal<boolean>;
|
|
184
|
+
readonly emailAvailable: _angular_core.Signal<boolean>;
|
|
185
|
+
readonly passkeysAvailable: _angular_core.Signal<boolean>;
|
|
186
|
+
readonly recoveryCodesAvailable: _angular_core.Signal<boolean>;
|
|
187
|
+
readonly reauthenticationMethods: _angular_core.Signal<string[]>;
|
|
188
|
+
readonly value: typeof nhTwoFactorInputValue;
|
|
189
|
+
constructor();
|
|
190
|
+
ngOnInit(): void;
|
|
191
|
+
load(): Promise<void>;
|
|
192
|
+
/** Starts a change, asking for reauthentication first when the change needs it. */
|
|
193
|
+
request(action: NhTwoFactorSettingsAction): void;
|
|
194
|
+
confirmReauthentication(): Promise<void>;
|
|
195
|
+
cancelReauthentication(): void;
|
|
196
|
+
confirmSetup(): Promise<void>;
|
|
197
|
+
closeSetup(): void;
|
|
198
|
+
resendEmailCode(): Promise<void>;
|
|
199
|
+
startRename(passkey: NhPasskey): void;
|
|
200
|
+
cancelRename(): void;
|
|
201
|
+
saveRename(passkey: NhPasskey): Promise<void>;
|
|
202
|
+
private needsReauthentication;
|
|
203
|
+
private perform;
|
|
204
|
+
private openSetup;
|
|
205
|
+
private applyChange;
|
|
206
|
+
private run;
|
|
207
|
+
private hasMethod;
|
|
208
|
+
private isAvailable;
|
|
209
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhTwoFactorSettingsComponent, never>;
|
|
210
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhTwoFactorSettingsComponent, "nh-two-factor-settings", never, { "showTitle": { "alias": "showTitle"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Signs in with a discoverable passkey, without a username or password. Renders nothing in
|
|
215
|
+
* browsers without passkey support.
|
|
216
|
+
*/
|
|
217
|
+
declare class NhPasskeyLoginButtonComponent {
|
|
218
|
+
private readonly auth;
|
|
219
|
+
/** Whether the button shows failures itself. */
|
|
220
|
+
readonly showErrors: _angular_core.InputSignal<boolean>;
|
|
221
|
+
readonly authenticated: _angular_core.OutputEmitterRef<INhAuthorization>;
|
|
222
|
+
/** The policy asked for more: a second-factor challenge or an enrollment. */
|
|
223
|
+
readonly pending: _angular_core.OutputEmitterRef<NhAuthenticationStep<INhAuthorization>>;
|
|
224
|
+
/** Translation keys of a failed sign-in. */
|
|
225
|
+
readonly failed: _angular_core.OutputEmitterRef<string[]>;
|
|
226
|
+
readonly id: string;
|
|
227
|
+
readonly supported: boolean;
|
|
228
|
+
readonly busy: _angular_core.WritableSignal<boolean>;
|
|
229
|
+
readonly errorKeys: _angular_core.WritableSignal<string[]>;
|
|
230
|
+
constructor();
|
|
231
|
+
signIn(): Promise<void>;
|
|
232
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhPasskeyLoginButtonComponent, never>;
|
|
233
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhPasskeyLoginButtonComponent, "nh-passkey-login-button", never, { "showErrors": { "alias": "showErrors"; "required": false; "isSignal": true; }; }, { "authenticated": "authenticated"; "pending": "pending"; "failed": "failed"; }, never, never, true, never>;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** The entry point's own translation bundles, keyed by language. All keys live under `nh-two-factor.`. */
|
|
237
|
+
declare const NH_TWO_FACTOR_TRANSLATIONS: Readonly<Record<'en' | 'nl', TranslationObject>>;
|
|
238
|
+
/**
|
|
239
|
+
* Merges the bundled texts into `TranslateService` whenever the host loads or replaces a
|
|
240
|
+
* language. Host loaders never lose these texts, and keys the host defines under
|
|
241
|
+
* `nh-two-factor.` win over the bundle. Languages without a bundle receive the English texts.
|
|
242
|
+
*/
|
|
243
|
+
declare class NhTwoFactorTranslationMerger {
|
|
244
|
+
private readonly translate;
|
|
245
|
+
private readonly destroyRef;
|
|
246
|
+
private started;
|
|
247
|
+
start(): void;
|
|
248
|
+
private ensure;
|
|
249
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhTwoFactorTranslationMerger, never>;
|
|
250
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NhTwoFactorTranslationMerger>;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Registers the two-factor texts at startup. The components also register them when they are
|
|
255
|
+
* first created, so this provider is only needed to translate `nh-two-factor.` failure keys
|
|
256
|
+
* outside the components, for example on a custom login page.
|
|
257
|
+
*/
|
|
258
|
+
declare function provideNhTwoFactor(): EnvironmentProviders;
|
|
259
|
+
|
|
260
|
+
export { NH_TWO_FACTOR_TRANSLATIONS, NhPasskeyLoginButtonComponent, NhTwoFactorChallengeComponent, NhTwoFactorEnrollmentComponent, NhTwoFactorRecoveryCodesComponent, NhTwoFactorSettingsComponent, NhTwoFactorTranslationMerger, nhTwoFactorErrorKeys, nhTwoFactorStepEnded, provideNhTwoFactor };
|
|
261
|
+
export type { NhTwoFactorSettingsAction };
|