keycloakify 6.7.2 → 6.8.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 +6 -0
- package/lib/components/Error.d.ts +6 -3
- package/lib/components/Error.js +4 -4
- package/lib/components/Error.js.map +1 -1
- package/lib/components/IdpReviewUserProfile.d.ts +6 -3
- package/lib/components/IdpReviewUserProfile.js +10 -10
- package/lib/components/IdpReviewUserProfile.js.map +1 -1
- package/lib/components/Info.d.ts +6 -3
- package/lib/components/Info.js +4 -4
- package/lib/components/Info.js.map +1 -1
- package/lib/components/KcApp.d.ts +7 -4
- package/lib/components/KcApp.js +25 -24
- package/lib/components/KcApp.js.map +1 -1
- package/lib/components/Login.d.ts +6 -3
- package/lib/components/Login.js +17 -17
- package/lib/components/Login.js.map +1 -1
- package/lib/components/LoginConfigTotp.d.ts +6 -3
- package/lib/components/LoginConfigTotp.js +25 -25
- package/lib/components/LoginConfigTotp.js.map +1 -1
- package/lib/components/LoginIdpLinkConfirm.d.ts +6 -3
- package/lib/components/LoginIdpLinkConfirm.js +7 -7
- package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
- package/lib/components/LoginIdpLinkEmail.d.ts +6 -3
- package/lib/components/LoginIdpLinkEmail.js +4 -4
- package/lib/components/LoginIdpLinkEmail.js.map +1 -1
- package/lib/components/LoginOtp.d.ts +6 -3
- package/lib/components/LoginOtp.js +19 -19
- package/lib/components/LoginOtp.js.map +1 -1
- package/lib/components/LoginPageExpired.d.ts +6 -3
- package/lib/components/LoginPageExpired.js +4 -4
- package/lib/components/LoginPageExpired.js.map +1 -1
- package/lib/components/LoginPassword.d.ts +6 -3
- package/lib/components/LoginPassword.js +12 -12
- package/lib/components/LoginPassword.js.map +1 -1
- package/lib/components/LoginResetPassword.d.ts +6 -3
- package/lib/components/LoginResetPassword.js +14 -14
- package/lib/components/LoginResetPassword.js.map +1 -1
- package/lib/components/LoginUpdatePassword.d.ts +6 -3
- package/lib/components/LoginUpdatePassword.js +20 -20
- package/lib/components/LoginUpdatePassword.js.map +1 -1
- package/lib/components/LoginUpdateProfile.d.ts +6 -3
- package/lib/components/LoginUpdateProfile.js +31 -31
- package/lib/components/LoginUpdateProfile.js.map +1 -1
- package/lib/components/LoginUsername.d.ts +6 -3
- package/lib/components/LoginUsername.js +13 -13
- package/lib/components/LoginUsername.js.map +1 -1
- package/lib/components/LoginVerifyEmail.d.ts +6 -3
- package/lib/components/LoginVerifyEmail.js +4 -4
- package/lib/components/LoginVerifyEmail.js.map +1 -1
- package/lib/components/LogoutConfirm.d.ts +6 -3
- package/lib/components/LogoutConfirm.js +8 -8
- package/lib/components/LogoutConfirm.js.map +1 -1
- package/lib/components/Register.d.ts +6 -3
- package/lib/components/Register.js +41 -41
- package/lib/components/Register.js.map +1 -1
- package/lib/components/RegisterUserProfile.d.ts +6 -3
- package/lib/components/RegisterUserProfile.js +12 -12
- package/lib/components/RegisterUserProfile.js.map +1 -1
- package/lib/components/Terms.d.ts +6 -3
- package/lib/components/Terms.js +6 -6
- package/lib/components/Terms.js.map +1 -1
- package/lib/components/UpdateUserProfile.d.ts +6 -3
- package/lib/components/UpdateUserProfile.js +11 -11
- package/lib/components/UpdateUserProfile.js.map +1 -1
- package/lib/components/WebauthnAuthenticate.d.ts +6 -3
- package/lib/components/WebauthnAuthenticate.js +18 -18
- package/lib/components/WebauthnAuthenticate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/lib/components/Error.tsx +34 -31
- package/src/lib/components/IdpReviewUserProfile.tsx +50 -47
- package/src/lib/components/Info.tsx +49 -46
- package/src/lib/components/KcApp.tsx +74 -69
- package/src/lib/components/Login.tsx +178 -175
- package/src/lib/components/LoginConfigTotp.tsx +163 -160
- package/src/lib/components/LoginIdpLinkConfirm.tsx +56 -43
- package/src/lib/components/LoginIdpLinkEmail.tsx +34 -31
- package/src/lib/components/LoginOtp.tsx +86 -83
- package/src/lib/components/LoginPageExpired.tsx +38 -35
- package/src/lib/components/LoginPassword.tsx +79 -76
- package/src/lib/components/LoginResetPassword.tsx +67 -64
- package/src/lib/components/LoginUpdatePassword.tsx +105 -102
- package/src/lib/components/LoginUpdateProfile.tsx +108 -105
- package/src/lib/components/LoginUsername.tsx +145 -142
- package/src/lib/components/LoginVerifyEmail.tsx +34 -31
- package/src/lib/components/LogoutConfirm.tsx +57 -54
- package/src/lib/components/Register.tsx +137 -134
- package/src/lib/components/RegisterUserProfile.tsx +63 -60
- package/src/lib/components/Terms.tsx +56 -52
- package/src/lib/components/UpdateUserProfile.tsx +61 -58
- package/src/lib/components/WebauthnAuthenticate.tsx +179 -178
@@ -1,77 +1,80 @@
|
|
1
1
|
import React, { useState, memo } from "react";
|
2
|
-
import
|
2
|
+
import DefaultTemplate from "./Template";
|
3
|
+
import type { TemplateProps } from "./Template";
|
3
4
|
import type { KcProps } from "./KcProps";
|
4
5
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
5
6
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
6
7
|
import type { I18n } from "../i18n";
|
7
8
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}: { kcContext: KcContextBase.UpdateUserProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
16
|
-
const { cx } = useCssAndCx();
|
10
|
+
export type UpdateUserProfileProps = KcProps & {
|
11
|
+
kcContext: KcContextBase.UpdateUserProfile;
|
12
|
+
i18n: I18n;
|
13
|
+
doFetchDefaultThemeResources?: boolean;
|
14
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
15
|
+
};
|
17
16
|
|
18
|
-
|
17
|
+
const UpdateUserProfile = memo((props: UpdateUserProfileProps) => {
|
18
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate, ...kcProps } = props;
|
19
19
|
|
20
|
-
|
20
|
+
const { cx } = useCssAndCx();
|
21
21
|
|
22
|
-
|
22
|
+
const { msg, msgStr } = i18n;
|
23
23
|
|
24
|
-
|
25
|
-
<Template
|
26
|
-
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
27
|
-
headerNode={msg("loginProfileTitle")}
|
28
|
-
formNode={
|
29
|
-
<form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
30
|
-
<UserProfileFormFields kcContext={kcContext} onIsFormSubmittableValueChange={setIsFomSubmittable} i18n={i18n} {...props} />
|
24
|
+
const { url, isAppInitiatedAction } = kcContext;
|
31
25
|
|
32
|
-
|
33
|
-
<div id="kc-form-options" className={cx(props.kcFormOptionsClass)}>
|
34
|
-
<div className={cx(props.kcFormOptionsWrapperClass)}></div>
|
35
|
-
</div>
|
26
|
+
const [isFomSubmittable, setIsFomSubmittable] = useState(false);
|
36
27
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</button>
|
54
|
-
</>
|
55
|
-
) : (
|
28
|
+
return (
|
29
|
+
<Template
|
30
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...kcProps }}
|
31
|
+
headerNode={msg("loginProfileTitle")}
|
32
|
+
formNode={
|
33
|
+
<form id="kc-update-profile-form" className={cx(kcProps.kcFormClass)} action={url.loginAction} method="post">
|
34
|
+
<UserProfileFormFields kcContext={kcContext} onIsFormSubmittableValueChange={setIsFomSubmittable} i18n={i18n} {...kcProps} />
|
35
|
+
|
36
|
+
<div className={cx(kcProps.kcFormGroupClass)}>
|
37
|
+
<div id="kc-form-options" className={cx(kcProps.kcFormOptionsClass)}>
|
38
|
+
<div className={cx(kcProps.kcFormOptionsWrapperClass)}></div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="kc-form-buttons" className={cx(kcProps.kcFormButtonsClass)}>
|
42
|
+
{isAppInitiatedAction ? (
|
43
|
+
<>
|
56
44
|
<input
|
57
|
-
className={cx(
|
58
|
-
props.kcButtonClass,
|
59
|
-
props.kcButtonPrimaryClass,
|
60
|
-
props.kcButtonBlockClass,
|
61
|
-
props.kcButtonLargeClass
|
62
|
-
)}
|
45
|
+
className={cx(kcProps.kcButtonClass, kcProps.kcButtonPrimaryClass, kcProps.kcButtonLargeClass)}
|
63
46
|
type="submit"
|
64
|
-
|
65
|
-
disabled={!isFomSubmittable}
|
47
|
+
value={msgStr("doSubmit")}
|
66
48
|
/>
|
67
|
-
|
68
|
-
|
49
|
+
<button
|
50
|
+
className={cx(kcProps.kcButtonClass, kcProps.kcButtonDefaultClass, kcProps.kcButtonLargeClass)}
|
51
|
+
type="submit"
|
52
|
+
name="cancel-aia"
|
53
|
+
value="true"
|
54
|
+
formNoValidate
|
55
|
+
>
|
56
|
+
{msg("doCancel")}
|
57
|
+
</button>
|
58
|
+
</>
|
59
|
+
) : (
|
60
|
+
<input
|
61
|
+
className={cx(
|
62
|
+
kcProps.kcButtonClass,
|
63
|
+
kcProps.kcButtonPrimaryClass,
|
64
|
+
kcProps.kcButtonBlockClass,
|
65
|
+
kcProps.kcButtonLargeClass
|
66
|
+
)}
|
67
|
+
type="submit"
|
68
|
+
defaultValue={msgStr("doSubmit")}
|
69
|
+
disabled={!isFomSubmittable}
|
70
|
+
/>
|
71
|
+
)}
|
69
72
|
</div>
|
70
|
-
</
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
);
|
73
|
+
</div>
|
74
|
+
</form>
|
75
|
+
}
|
76
|
+
/>
|
77
|
+
);
|
78
|
+
});
|
76
79
|
|
77
80
|
export default UpdateUserProfile;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React, { useRef, useState, memo } from "react";
|
2
|
-
import
|
2
|
+
import DefaultTemplate from "./Template";
|
3
|
+
import type { TemplateProps } from "./Template";
|
3
4
|
import type { KcProps } from "./KcProps";
|
4
5
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
5
6
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
@@ -7,198 +8,198 @@ import type { I18n, MessageKeyBase } from "../i18n";
|
|
7
8
|
import { base64url } from "rfc4648";
|
8
9
|
import { useConstCallback } from "powerhooks/useConstCallback";
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}: { kcContext: KcContextBase.WebauthnAuthenticate; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
17
|
-
const { url } = kcContext;
|
11
|
+
export type WebauthnAuthenticateProps = KcProps & {
|
12
|
+
kcContext: KcContextBase.WebauthnAuthenticate;
|
13
|
+
i18n: I18n;
|
14
|
+
doFetchDefaultThemeResources?: boolean;
|
15
|
+
Template?: (props: TemplateProps) => JSX.Element | null;
|
16
|
+
};
|
18
17
|
|
19
|
-
|
18
|
+
const WebauthnAuthenticate = memo((props: WebauthnAuthenticateProps) => {
|
19
|
+
const { kcContext, i18n, doFetchDefaultThemeResources = true, Template = DefaultTemplate, ...kcProps } = props;
|
20
20
|
|
21
|
-
|
22
|
-
const createTimeout = Number(kcContext.createTimeout);
|
23
|
-
const isUserIdentified = kcContext.isUserIdentified == "true";
|
21
|
+
const { url } = kcContext;
|
24
22
|
|
25
|
-
|
23
|
+
const { msg, msgStr } = i18n;
|
26
24
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
31
|
-
const allowCredentials = authenticators.authenticators.map(
|
32
|
-
authenticator =>
|
33
|
-
({
|
34
|
-
id: base64url.parse(authenticator.credentialId, { loose: true }),
|
35
|
-
type: "public-key"
|
36
|
-
} as PublicKeyCredentialDescriptor)
|
37
|
-
);
|
38
|
-
// Check if WebAuthn is supported by this browser
|
39
|
-
if (!window.PublicKeyCredential) {
|
40
|
-
setError(msgStr("webauthn-unsupported-browser-text"));
|
41
|
-
submitForm();
|
42
|
-
return;
|
43
|
-
}
|
44
|
-
|
45
|
-
const publicKey: PublicKeyCredentialRequestOptions = {
|
46
|
-
rpId,
|
47
|
-
challenge: base64url.parse(challenge, { loose: true })
|
48
|
-
};
|
49
|
-
|
50
|
-
if (createTimeout !== 0) {
|
51
|
-
publicKey.timeout = createTimeout * 1000;
|
52
|
-
}
|
53
|
-
|
54
|
-
if (allowCredentials.length) {
|
55
|
-
publicKey.allowCredentials = allowCredentials;
|
56
|
-
}
|
25
|
+
const { authenticators, challenge, shouldDisplayAuthenticators, userVerification, rpId } = kcContext;
|
26
|
+
const createTimeout = Number(kcContext.createTimeout);
|
27
|
+
const isUserIdentified = kcContext.isUserIdentified == "true";
|
57
28
|
|
58
|
-
|
59
|
-
publicKey.userVerification = userVerification;
|
60
|
-
}
|
29
|
+
const { cx } = useCssAndCx();
|
61
30
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
31
|
+
const webAuthnAuthenticate = useConstCallback(async () => {
|
32
|
+
if (!isUserIdentified) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
const allowCredentials = authenticators.authenticators.map(
|
36
|
+
authenticator =>
|
37
|
+
({
|
38
|
+
id: base64url.parse(authenticator.credentialId, { loose: true }),
|
39
|
+
type: "public-key"
|
40
|
+
} as PublicKeyCredentialDescriptor)
|
41
|
+
);
|
42
|
+
// Check if WebAuthn is supported by this browser
|
43
|
+
if (!window.PublicKeyCredential) {
|
44
|
+
setError(msgStr("webauthn-unsupported-browser-text"));
|
45
|
+
submitForm();
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
|
49
|
+
const publicKey: PublicKeyCredentialRequestOptions = {
|
50
|
+
rpId,
|
51
|
+
challenge: base64url.parse(challenge, { loose: true })
|
52
|
+
};
|
53
|
+
|
54
|
+
if (createTimeout !== 0) {
|
55
|
+
publicKey.timeout = createTimeout * 1000;
|
56
|
+
}
|
57
|
+
|
58
|
+
if (allowCredentials.length) {
|
59
|
+
publicKey.allowCredentials = allowCredentials;
|
60
|
+
}
|
61
|
+
|
62
|
+
if (userVerification !== "not specified") {
|
63
|
+
publicKey.userVerification = userVerification;
|
64
|
+
}
|
65
|
+
|
66
|
+
try {
|
67
|
+
const resultRaw = await navigator.credentials.get({ publicKey });
|
68
|
+
if (!resultRaw || resultRaw.type != "public-key") return;
|
69
|
+
const result = resultRaw as PublicKeyCredential;
|
70
|
+
if (!("authenticatorData" in result.response)) return;
|
71
|
+
const response = result.response as AuthenticatorAssertionResponse;
|
72
|
+
const clientDataJSON = response.clientDataJSON;
|
73
|
+
const authenticatorData = response.authenticatorData;
|
74
|
+
const signature = response.signature;
|
75
|
+
|
76
|
+
setClientDataJSON(base64url.stringify(new Uint8Array(clientDataJSON), { pad: false }));
|
77
|
+
setAuthenticatorData(base64url.stringify(new Uint8Array(authenticatorData), { pad: false }));
|
78
|
+
setSignature(base64url.stringify(new Uint8Array(signature), { pad: false }));
|
79
|
+
setCredentialId(result.id);
|
80
|
+
setUserHandle(base64url.stringify(new Uint8Array(response.userHandle!), { pad: false }));
|
81
|
+
submitForm();
|
82
|
+
} catch (err) {
|
83
|
+
setError(String(err));
|
84
|
+
submitForm();
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
88
|
+
const webAuthForm = useRef<HTMLFormElement>(null);
|
89
|
+
const submitForm = useConstCallback(() => {
|
90
|
+
webAuthForm.current!.submit();
|
91
|
+
});
|
92
|
+
|
93
|
+
const [clientDataJSON, setClientDataJSON] = useState("");
|
94
|
+
const [authenticatorData, setAuthenticatorData] = useState("");
|
95
|
+
const [signature, setSignature] = useState("");
|
96
|
+
const [credentialId, setCredentialId] = useState("");
|
97
|
+
const [userHandle, setUserHandle] = useState("");
|
98
|
+
const [error, setError] = useState("");
|
99
|
+
|
100
|
+
return (
|
101
|
+
<Template
|
102
|
+
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...kcProps }}
|
103
|
+
headerNode={msg("webauthn-login-title")}
|
104
|
+
formNode={
|
105
|
+
<div id="kc-form-webauthn" className={cx(kcProps.kcFormClass)}>
|
106
|
+
<form id="webauth" action={url.loginAction} ref={webAuthForm} method="post">
|
107
|
+
<input type="hidden" id="clientDataJSON" name="clientDataJSON" value={clientDataJSON} />
|
108
|
+
<input type="hidden" id="authenticatorData" name="authenticatorData" value={authenticatorData} />
|
109
|
+
<input type="hidden" id="signature" name="signature" value={signature} />
|
110
|
+
<input type="hidden" id="credentialId" name="credentialId" value={credentialId} />
|
111
|
+
<input type="hidden" id="userHandle" name="userHandle" value={userHandle} />
|
112
|
+
<input type="hidden" id="error" name="error" value={error} />
|
113
|
+
</form>
|
114
|
+
<div className={cx(kcProps.kcFormGroupClass)}>
|
115
|
+
{authenticators &&
|
116
|
+
(() => (
|
117
|
+
<form id="authn_select" className={cx(kcProps.kcFormClass)}>
|
118
|
+
{authenticators.authenticators.map(authenticator => (
|
119
|
+
<input
|
120
|
+
type="hidden"
|
121
|
+
name="authn_use_chk"
|
122
|
+
value={authenticator.credentialId}
|
123
|
+
key={authenticator.credentialId}
|
124
|
+
/>
|
125
|
+
))}
|
126
|
+
</form>
|
127
|
+
))()}
|
128
|
+
{authenticators &&
|
129
|
+
shouldDisplayAuthenticators &&
|
130
|
+
(() => (
|
131
|
+
<>
|
132
|
+
{authenticators.authenticators.length > 1 && (
|
133
|
+
<p className={cx(kcProps.kcSelectAuthListItemTitle)}>{msg("webauthn-available-authenticators")}</p>
|
134
|
+
)}
|
135
|
+
<div className={cx(kcProps.kcFormClass)}>
|
114
136
|
{authenticators.authenticators.map(authenticator => (
|
115
|
-
<
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
)}
|
131
|
-
<div className={cx(props.kcFormClass)}>
|
132
|
-
{authenticators.authenticators.map(authenticator => (
|
133
|
-
<div id="kc-webauthn-authenticator" className={cx(props.kcSelectAuthListItemClass)}>
|
134
|
-
<div className={cx(props.kcSelectAuthListItemIconClass)}>
|
135
|
-
<i
|
136
|
-
className={cx(
|
137
|
-
props[authenticator.transports.iconClass] ?? props.kcWebAuthnDefaultIcon,
|
138
|
-
props.kcSelectAuthListItemIconPropertyClass
|
139
|
-
)}
|
140
|
-
/>
|
137
|
+
<div id="kc-webauthn-authenticator" className={cx(kcProps.kcSelectAuthListItemClass)}>
|
138
|
+
<div className={cx(kcProps.kcSelectAuthListItemIconClass)}>
|
139
|
+
<i
|
140
|
+
className={cx(
|
141
|
+
kcProps[authenticator.transports.iconClass] ?? kcProps.kcWebAuthnDefaultIcon,
|
142
|
+
kcProps.kcSelectAuthListItemIconPropertyClass
|
143
|
+
)}
|
144
|
+
/>
|
145
|
+
</div>
|
146
|
+
<div className={cx(kcProps.kcSelectAuthListItemBodyClass)}>
|
147
|
+
<div
|
148
|
+
id="kc-webauthn-authenticator-label"
|
149
|
+
className={cx(kcProps.kcSelectAuthListItemHeadingClass)}
|
150
|
+
>
|
151
|
+
{authenticator.label}
|
141
152
|
</div>
|
142
|
-
|
153
|
+
|
154
|
+
{authenticator.transports && authenticator.transports.displayNameProperties.length && (
|
143
155
|
<div
|
144
|
-
id="kc-webauthn-authenticator-
|
145
|
-
className={cx(
|
156
|
+
id="kc-webauthn-authenticator-transport"
|
157
|
+
className={cx(kcProps.kcSelectAuthListItemDescriptionClass)}
|
146
158
|
>
|
147
|
-
{authenticator.
|
159
|
+
{authenticator.transports.displayNameProperties.map(
|
160
|
+
(transport: MessageKeyBase, index: number) => (
|
161
|
+
<>
|
162
|
+
<span>{msg(transport)}</span>
|
163
|
+
{index < authenticator.transports.displayNameProperties.length - 1 && (
|
164
|
+
<span>{", "}</span>
|
165
|
+
)}
|
166
|
+
</>
|
167
|
+
)
|
168
|
+
)}
|
148
169
|
</div>
|
170
|
+
)}
|
149
171
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
className={cx(props.kcSelectAuthListItemDescriptionClass)}
|
154
|
-
>
|
155
|
-
{authenticator.transports.displayNameProperties.map(
|
156
|
-
(transport: MessageKeyBase, index: number) => (
|
157
|
-
<>
|
158
|
-
<span>{msg(transport)}</span>
|
159
|
-
{index < authenticator.transports.displayNameProperties.length - 1 && (
|
160
|
-
<span>{", "}</span>
|
161
|
-
)}
|
162
|
-
</>
|
163
|
-
)
|
164
|
-
)}
|
165
|
-
</div>
|
166
|
-
)}
|
167
|
-
|
168
|
-
<div className={cx(props.kcSelectAuthListItemDescriptionClass)}>
|
169
|
-
<span id="kc-webauthn-authenticator-created-label">
|
170
|
-
{msg("webauthn-createdAt-label")}
|
171
|
-
</span>
|
172
|
-
<span id="kc-webauthn-authenticator-created">{authenticator.createdAt}</span>
|
173
|
-
</div>
|
172
|
+
<div className={cx(kcProps.kcSelectAuthListItemDescriptionClass)}>
|
173
|
+
<span id="kc-webauthn-authenticator-created-label">{msg("webauthn-createdAt-label")}</span>
|
174
|
+
<span id="kc-webauthn-authenticator-created">{authenticator.createdAt}</span>
|
174
175
|
</div>
|
175
|
-
<div className={cx(props.kcSelectAuthListItemFillClass)} />
|
176
176
|
</div>
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
177
|
+
<div className={cx(kcProps.kcSelectAuthListItemFillClass)} />
|
178
|
+
</div>
|
179
|
+
))}
|
180
|
+
</div>
|
181
|
+
</>
|
182
|
+
))()}
|
183
|
+
<div id="kc-form-buttons" className={cx(kcProps.kcFormButtonsClass)}>
|
184
|
+
<input
|
185
|
+
id="authenticateWebAuthnButton"
|
186
|
+
type="button"
|
187
|
+
onClick={webAuthnAuthenticate}
|
188
|
+
autoFocus={true}
|
189
|
+
value={msgStr("webauthn-doAuthenticate")}
|
190
|
+
className={cx(
|
191
|
+
kcProps.kcButtonClass,
|
192
|
+
kcProps.kcButtonPrimaryClass,
|
193
|
+
kcProps.kcButtonBlockClass,
|
194
|
+
kcProps.kcButtonLargeClass
|
195
|
+
)}
|
196
|
+
/>
|
196
197
|
</div>
|
197
198
|
</div>
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
);
|
199
|
+
</div>
|
200
|
+
}
|
201
|
+
/>
|
202
|
+
);
|
203
|
+
});
|
203
204
|
|
204
205
|
export default WebauthnAuthenticate;
|