@keycloakify/angular 0.1.2 → 0.1.4
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/bin/84.index.js +51 -39
- package/package.json +1 -1
- package/src/bin/eject-page.ts +52 -40
- package/src/bin/initialize-account-theme/boilerplate/KcPageStory.ts +1 -1
- package/stories/account/pages/account.stories.ts +6 -6
- package/stories/account/pages/applications.stories.ts +6 -7
- package/stories/account/pages/federated-identity.stories.ts +3 -3
- package/stories/account/pages/log.stories.ts +6 -6
- package/stories/account/pages/password.stories.ts +37 -45
- package/stories/account/pages/sessions.stories.ts +6 -6
- package/stories/account/pages/totp.stories.ts +2 -2
- package/stories/login/pages/code.stories.ts +3 -3
- package/stories/login/pages/delete-account-confirm.stories.ts +3 -3
- package/stories/login/pages/delete-credential.stories.ts +4 -4
- package/stories/login/pages/error.stories.ts +4 -4
- package/stories/login/pages/frontchannel-logout.stories.ts +1 -1
- package/stories/login/pages/idp-review-user-profile.stories.ts +3 -3
- package/stories/login/pages/info.stories.ts +7 -7
- package/stories/login/pages/login-config-totp.stories.ts +4 -4
- package/stories/login/pages/login-idp-link-confirm.stories.ts +4 -4
- package/stories/login/pages/login-idp-link-email.stories.ts +4 -4
- package/stories/login/pages/login-oauth-grant.stories.ts +3 -3
- package/stories/login/pages/login-otp.stories.ts +4 -4
- package/stories/login/pages/login-page-expired.stories.ts +1 -1
- package/stories/login/pages/login-password.stories.ts +2 -2
- package/stories/login/pages/login-recovery-authn-code-config.stories.ts +1 -1
- package/stories/login/pages/login-reset-otp.stories.ts +3 -3
- package/stories/login/pages/login-reset-password.stories.ts +2 -2
- package/stories/login/pages/login-update-password.stories.ts +2 -2
- package/stories/login/pages/login-update-profile.stories.ts +1 -1
- package/stories/login/pages/login-username.stories.ts +1 -1
- package/stories/login/pages/login-verify-email.stories.ts +4 -4
- package/stories/login/pages/login-x509-info.stories.ts +1 -1
- package/stories/login/pages/login.stories.ts +14 -14
- package/stories/login/pages/logout-confirm.stories.ts +1 -1
- package/stories/login/pages/register.stories.ts +13 -13
- package/stories/login/pages/select-authenticator.stories.ts +3 -3
- package/stories/login/pages/terms.stories.ts +4 -4
- package/stories/login/pages/update-email.stories.ts +1 -1
- package/stories/login/pages/webauthn-authenticate.stories.ts +4 -4
- package/stories/login/pages/webauthn-error.stories.ts +3 -3
- package/stories/login/pages/webauthn-register.stories.ts +2 -2
package/bin/84.index.js
CHANGED
|
@@ -453,45 +453,57 @@ async function command(params) {
|
|
|
453
453
|
source/* default */.Ay.grey('```'),
|
|
454
454
|
`// ...`,
|
|
455
455
|
``,
|
|
456
|
-
...
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
456
|
+
...(() => {
|
|
457
|
+
let inGreenBlock = false;
|
|
458
|
+
return [
|
|
459
|
+
` export async function getKcPage(pageId: KcContext['pageId']): Promise<KcPage> {`,
|
|
460
|
+
` switch (pageId) {`,
|
|
461
|
+
`+`,
|
|
462
|
+
` case '${pageId}':`,
|
|
463
|
+
` return {`,
|
|
464
|
+
` PageComponent: (await import('${componentRelativeDirPath_posix_to_componentRelativeFilePath_posix({
|
|
465
|
+
componentRelativeDirPath_posix: `./${componentDirRelativeToThemeTypePath.split(external_path_.sep).join('/')}`
|
|
466
|
+
})}')).${kebabCaseToCamelCase(capitalize(pageId).replace(/\.ftl$/, ''))}Component,`,
|
|
467
|
+
` TemplateComponent,`,
|
|
468
|
+
...(themeType === 'login'
|
|
469
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
470
|
+
: []),
|
|
471
|
+
...(themeType === 'login'
|
|
472
|
+
? [` doMakeUserConfirmPassword,`]
|
|
473
|
+
: []),
|
|
474
|
+
` doUseDefaultCss,`,
|
|
475
|
+
` classes,`,
|
|
476
|
+
` };`,
|
|
477
|
+
`+`,
|
|
478
|
+
` //...`,
|
|
479
|
+
` default:`,
|
|
480
|
+
` return {`,
|
|
481
|
+
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
482
|
+
` TemplateComponent,`,
|
|
483
|
+
...(themeType === 'login'
|
|
484
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
485
|
+
: []),
|
|
486
|
+
...(themeType === 'login'
|
|
487
|
+
? [` doMakeUserConfirmPassword,`]
|
|
488
|
+
: []),
|
|
489
|
+
` doUseDefaultCss,`,
|
|
490
|
+
` classes,`,
|
|
491
|
+
` };`,
|
|
492
|
+
` }`,
|
|
493
|
+
` }`
|
|
494
|
+
].map(line => {
|
|
495
|
+
if (line === `+`) {
|
|
496
|
+
inGreenBlock = !inGreenBlock;
|
|
497
|
+
}
|
|
498
|
+
if (inGreenBlock || line.startsWith('+')) {
|
|
499
|
+
return source/* default */.Ay.green(line);
|
|
500
|
+
}
|
|
501
|
+
if (line.startsWith('-')) {
|
|
502
|
+
return source/* default */.Ay.red(line);
|
|
503
|
+
}
|
|
504
|
+
return source/* default */.Ay.grey(line);
|
|
505
|
+
});
|
|
506
|
+
})(),
|
|
495
507
|
source/* default */.Ay.grey('```')
|
|
496
508
|
].join('\n'));
|
|
497
509
|
}
|
package/package.json
CHANGED
package/src/bin/eject-page.ts
CHANGED
|
@@ -352,47 +352,59 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
352
352
|
chalk.grey('```'),
|
|
353
353
|
`// ...`,
|
|
354
354
|
``,
|
|
355
|
-
...
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
{
|
|
362
|
-
|
|
355
|
+
...(() => {
|
|
356
|
+
let inGreenBlock = false;
|
|
357
|
+
return [
|
|
358
|
+
` export async function getKcPage(pageId: KcContext['pageId']): Promise<KcPage> {`,
|
|
359
|
+
` switch (pageId) {`,
|
|
360
|
+
`+`,
|
|
361
|
+
` case '${pageId}':`,
|
|
362
|
+
` return {`,
|
|
363
|
+
` PageComponent: (await import('${componentRelativeDirPath_posix_to_componentRelativeFilePath_posix(
|
|
364
|
+
{
|
|
365
|
+
componentRelativeDirPath_posix: `./${componentDirRelativeToThemeTypePath.split(pathSep).join('/')}`
|
|
366
|
+
}
|
|
367
|
+
)}')).${kebabCaseToCamelCase(capitalize(pageId).replace(/\.ftl$/, ''))}Component,`,
|
|
368
|
+
` TemplateComponent,`,
|
|
369
|
+
...(themeType === 'login'
|
|
370
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
371
|
+
: []),
|
|
372
|
+
...(themeType === 'login'
|
|
373
|
+
? [` doMakeUserConfirmPassword,`]
|
|
374
|
+
: []),
|
|
375
|
+
` doUseDefaultCss,`,
|
|
376
|
+
` classes,`,
|
|
377
|
+
` };`,
|
|
378
|
+
`+`,
|
|
379
|
+
` //...`,
|
|
380
|
+
` default:`,
|
|
381
|
+
` return {`,
|
|
382
|
+
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
383
|
+
` TemplateComponent,`,
|
|
384
|
+
...(themeType === 'login'
|
|
385
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
386
|
+
: []),
|
|
387
|
+
...(themeType === 'login'
|
|
388
|
+
? [` doMakeUserConfirmPassword,`]
|
|
389
|
+
: []),
|
|
390
|
+
` doUseDefaultCss,`,
|
|
391
|
+
` classes,`,
|
|
392
|
+
` };`,
|
|
393
|
+
` }`,
|
|
394
|
+
` }`
|
|
395
|
+
].map(line => {
|
|
396
|
+
if (line === `+`) {
|
|
397
|
+
inGreenBlock = !inGreenBlock;
|
|
363
398
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
` //...`,
|
|
374
|
-
` default:`,
|
|
375
|
-
` return {`,
|
|
376
|
-
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
377
|
-
` TemplateComponent,`,
|
|
378
|
-
...(themeType === 'login'
|
|
379
|
-
? [` UserProfileFormFieldsComponent,`]
|
|
380
|
-
: []),
|
|
381
|
-
...(themeType === 'login' ? [` doMakeUserConfirmPassword,`] : []),
|
|
382
|
-
` doUseDefaultCss,`,
|
|
383
|
-
` classes,`,
|
|
384
|
-
` };`,
|
|
385
|
-
` }`,
|
|
386
|
-
` }`
|
|
387
|
-
].map(line => {
|
|
388
|
-
if (line.startsWith('+')) {
|
|
389
|
-
return chalk.green(line);
|
|
390
|
-
}
|
|
391
|
-
if (line.startsWith('-')) {
|
|
392
|
-
return chalk.red(line);
|
|
393
|
-
}
|
|
394
|
-
return chalk.grey(line);
|
|
395
|
-
}),
|
|
399
|
+
if (inGreenBlock || line.startsWith('+')) {
|
|
400
|
+
return chalk.green(line);
|
|
401
|
+
}
|
|
402
|
+
if (line.startsWith('-')) {
|
|
403
|
+
return chalk.red(line);
|
|
404
|
+
}
|
|
405
|
+
return chalk.grey(line);
|
|
406
|
+
});
|
|
407
|
+
})(),
|
|
396
408
|
chalk.grey('```')
|
|
397
409
|
].join('\n')
|
|
398
410
|
);
|
|
@@ -37,7 +37,7 @@ export const decorators = (_: unknown, context: StoryContextLike) => ({
|
|
|
37
37
|
classes: {},
|
|
38
38
|
kcContext: getKcContextMock({
|
|
39
39
|
pageId: context.globals['pageId'],
|
|
40
|
-
overrides: context.globals['
|
|
40
|
+
overrides: context.globals['kcContext']
|
|
41
41
|
}),
|
|
42
42
|
getI18n: getI18n
|
|
43
43
|
})
|
|
@@ -18,7 +18,7 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const UsernameNotEditable: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
21
|
+
kcContext: {
|
|
22
22
|
account: {
|
|
23
23
|
username: 'john_doe',
|
|
24
24
|
email: 'john.doe@gmail.com',
|
|
@@ -45,7 +45,7 @@ export const UsernameNotEditable: Story = {
|
|
|
45
45
|
|
|
46
46
|
export const WithValidationErrors: Story = {
|
|
47
47
|
globals: {
|
|
48
|
-
|
|
48
|
+
kcContext: {
|
|
49
49
|
account: {
|
|
50
50
|
username: 'john_doe',
|
|
51
51
|
email: '',
|
|
@@ -73,7 +73,7 @@ export const WithValidationErrors: Story = {
|
|
|
73
73
|
|
|
74
74
|
export const EmailAsUsername: Story = {
|
|
75
75
|
globals: {
|
|
76
|
-
|
|
76
|
+
kcContext: {
|
|
77
77
|
account: {
|
|
78
78
|
email: 'john.doe@gmail.com',
|
|
79
79
|
firstName: 'John',
|
|
@@ -98,7 +98,7 @@ export const EmailAsUsername: Story = {
|
|
|
98
98
|
|
|
99
99
|
export const WithErrorCode: Story = {
|
|
100
100
|
globals: {
|
|
101
|
-
|
|
101
|
+
kcContext: {
|
|
102
102
|
code: {
|
|
103
103
|
success: false,
|
|
104
104
|
error: 'Failed to generate code'
|
|
@@ -109,7 +109,7 @@ export const WithErrorCode: Story = {
|
|
|
109
109
|
|
|
110
110
|
export const WithFrenchLanguage: Story = {
|
|
111
111
|
globals: {
|
|
112
|
-
|
|
112
|
+
kcContext: {
|
|
113
113
|
locale: {
|
|
114
114
|
currentLanguageTag: 'fr'
|
|
115
115
|
},
|
|
@@ -123,7 +123,7 @@ export const WithFrenchLanguage: Story = {
|
|
|
123
123
|
|
|
124
124
|
export const WithHtmlErrorMessage: Story = {
|
|
125
125
|
globals: {
|
|
126
|
-
|
|
126
|
+
kcContext: {
|
|
127
127
|
code: {
|
|
128
128
|
success: false,
|
|
129
129
|
error: "Something went wrong. <a href='https://example.com'>Try again</a>"
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
applications: {
|
|
21
21
|
applications: [
|
|
22
22
|
{
|
|
@@ -72,7 +72,7 @@ export const Default: Story = {
|
|
|
72
72
|
|
|
73
73
|
export const NoAvailableRolesOrGrants: Story = {
|
|
74
74
|
globals: {
|
|
75
|
-
|
|
75
|
+
kcContext: {
|
|
76
76
|
applications: {
|
|
77
77
|
applications: [
|
|
78
78
|
{
|
|
@@ -95,7 +95,7 @@ export const NoAvailableRolesOrGrants: Story = {
|
|
|
95
95
|
|
|
96
96
|
export const ConsentNotRequired: Story = {
|
|
97
97
|
globals: {
|
|
98
|
-
|
|
98
|
+
kcContext: {
|
|
99
99
|
applications: {
|
|
100
100
|
applications: [
|
|
101
101
|
{
|
|
@@ -118,7 +118,7 @@ export const ConsentNotRequired: Story = {
|
|
|
118
118
|
|
|
119
119
|
export const NoRolesButConsentRequired: Story = {
|
|
120
120
|
globals: {
|
|
121
|
-
|
|
121
|
+
kcContext: {
|
|
122
122
|
applications: {
|
|
123
123
|
applications: [
|
|
124
124
|
{
|
|
@@ -141,7 +141,7 @@ export const NoRolesButConsentRequired: Story = {
|
|
|
141
141
|
|
|
142
142
|
export const OnlyResourceRolesAvailable: Story = {
|
|
143
143
|
globals: {
|
|
144
|
-
|
|
144
|
+
kcContext: {
|
|
145
145
|
applications: {
|
|
146
146
|
applications: [
|
|
147
147
|
{
|
|
@@ -173,8 +173,7 @@ export const OnlyResourceRolesAvailable: Story = {
|
|
|
173
173
|
|
|
174
174
|
export const NoAdditionalGrants: Story = {
|
|
175
175
|
globals: {
|
|
176
|
-
|
|
177
|
-
pageId: 'applications.ftl',
|
|
176
|
+
kcContext: {
|
|
178
177
|
applications: {
|
|
179
178
|
applications: [
|
|
180
179
|
{
|
|
@@ -18,7 +18,7 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const NotConnected: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
21
|
+
kcContext: {
|
|
22
22
|
federatedIdentity: {
|
|
23
23
|
identities: [
|
|
24
24
|
{
|
|
@@ -35,7 +35,7 @@ export const NotConnected: Story = {
|
|
|
35
35
|
|
|
36
36
|
export const RemoveLinkNotPossible: Story = {
|
|
37
37
|
globals: {
|
|
38
|
-
|
|
38
|
+
kcContext: {
|
|
39
39
|
federatedIdentity: {
|
|
40
40
|
identities: [
|
|
41
41
|
{
|
|
@@ -57,7 +57,7 @@ export const RemoveLinkNotPossible: Story = {
|
|
|
57
57
|
|
|
58
58
|
export const AddLinkForUnconnectedIdentity: Story = {
|
|
59
59
|
globals: {
|
|
60
|
-
|
|
60
|
+
kcContext: {
|
|
61
61
|
federatedIdentity: {
|
|
62
62
|
identities: [
|
|
63
63
|
{
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
log: {
|
|
21
21
|
events: [
|
|
22
22
|
{
|
|
@@ -48,7 +48,7 @@ export const Default: Story = {
|
|
|
48
48
|
|
|
49
49
|
export const LogsMissingDetails: Story = {
|
|
50
50
|
globals: {
|
|
51
|
-
|
|
51
|
+
kcContext: {
|
|
52
52
|
log: {
|
|
53
53
|
events: [
|
|
54
54
|
{
|
|
@@ -66,7 +66,7 @@ export const LogsMissingDetails: Story = {
|
|
|
66
66
|
|
|
67
67
|
export const SingleLogEntry: Story = {
|
|
68
68
|
globals: {
|
|
69
|
-
|
|
69
|
+
kcContext: {
|
|
70
70
|
log: {
|
|
71
71
|
events: [
|
|
72
72
|
{
|
|
@@ -87,7 +87,7 @@ export const SingleLogEntry: Story = {
|
|
|
87
87
|
|
|
88
88
|
export const LogsWithLongDetails: Story = {
|
|
89
89
|
globals: {
|
|
90
|
-
|
|
90
|
+
kcContext: {
|
|
91
91
|
log: {
|
|
92
92
|
events: [
|
|
93
93
|
{
|
|
@@ -117,7 +117,7 @@ export const LogsWithLongDetails: Story = {
|
|
|
117
117
|
|
|
118
118
|
export const EmptyClientField: Story = {
|
|
119
119
|
globals: {
|
|
120
|
-
|
|
120
|
+
kcContext: {
|
|
121
121
|
log: {
|
|
122
122
|
events: [
|
|
123
123
|
{
|
|
@@ -138,7 +138,7 @@ export const EmptyClientField: Story = {
|
|
|
138
138
|
|
|
139
139
|
export const NoLogsAvailable: Story = {
|
|
140
140
|
globals: {
|
|
141
|
-
|
|
141
|
+
kcContext: {
|
|
142
142
|
log: {
|
|
143
143
|
events: [] // No log events
|
|
144
144
|
}
|
|
@@ -18,10 +18,8 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const WithMessage: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
message: { type: 'success', summary: 'This is a test message' }
|
|
24
|
-
}
|
|
21
|
+
kcContext: {
|
|
22
|
+
message: { type: 'success', summary: 'This is a test message' }
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
};
|
|
@@ -34,19 +32,17 @@ export const WithMessage: Story = {
|
|
|
34
32
|
*/
|
|
35
33
|
export const FirstTimePasswordSetup: Story = {
|
|
36
34
|
globals: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
stateChecker: 'state-checker'
|
|
49
|
-
}
|
|
35
|
+
kcContext: {
|
|
36
|
+
account: {
|
|
37
|
+
username: 'john_doe'
|
|
38
|
+
},
|
|
39
|
+
password: {
|
|
40
|
+
passwordSet: false
|
|
41
|
+
},
|
|
42
|
+
url: {
|
|
43
|
+
passwordUrl: '/password'
|
|
44
|
+
},
|
|
45
|
+
stateChecker: 'state-checker'
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
};
|
|
@@ -59,20 +55,18 @@ export const FirstTimePasswordSetup: Story = {
|
|
|
59
55
|
*/
|
|
60
56
|
export const IncorrectCurrentPassword: Story = {
|
|
61
57
|
globals: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
stateChecker: 'state-checker'
|
|
75
|
-
}
|
|
58
|
+
kcContext: {
|
|
59
|
+
message: { type: 'error', summary: 'Incorrect current password.' },
|
|
60
|
+
account: {
|
|
61
|
+
username: 'john_doe'
|
|
62
|
+
},
|
|
63
|
+
password: {
|
|
64
|
+
passwordSet: true
|
|
65
|
+
},
|
|
66
|
+
url: {
|
|
67
|
+
passwordUrl: '/password'
|
|
68
|
+
},
|
|
69
|
+
stateChecker: 'state-checker'
|
|
76
70
|
}
|
|
77
71
|
}
|
|
78
72
|
};
|
|
@@ -85,20 +79,18 @@ export const IncorrectCurrentPassword: Story = {
|
|
|
85
79
|
*/
|
|
86
80
|
export const SubmissionSuccessWithRedirect: Story = {
|
|
87
81
|
globals: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
stateChecker: 'state-checker'
|
|
101
|
-
}
|
|
82
|
+
kcContext: {
|
|
83
|
+
message: { type: 'success', summary: 'Password successfully changed.' },
|
|
84
|
+
account: {
|
|
85
|
+
username: 'john_doe'
|
|
86
|
+
},
|
|
87
|
+
password: {
|
|
88
|
+
passwordSet: true
|
|
89
|
+
},
|
|
90
|
+
url: {
|
|
91
|
+
passwordUrl: '/password'
|
|
92
|
+
},
|
|
93
|
+
stateChecker: 'state-checker'
|
|
102
94
|
}
|
|
103
95
|
}
|
|
104
96
|
};
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
sessions: {
|
|
21
21
|
sessions: [
|
|
22
22
|
{
|
|
@@ -44,7 +44,7 @@ export const Default: Story = {
|
|
|
44
44
|
|
|
45
45
|
export const WithError: Story = {
|
|
46
46
|
globals: {
|
|
47
|
-
|
|
47
|
+
kcContext: {
|
|
48
48
|
url: { passwordUrl: '/auth/realms/keycloakify/account/password' },
|
|
49
49
|
stateChecker: 'xQ7EOgFrLi4EvnJ8dbXKhwFGWk_bkOp0X89mhilt1os',
|
|
50
50
|
message: {
|
|
@@ -61,7 +61,7 @@ export const WithError: Story = {
|
|
|
61
61
|
*/
|
|
62
62
|
export const NoActiveSessions: Story = {
|
|
63
63
|
globals: {
|
|
64
|
-
|
|
64
|
+
kcContext: {
|
|
65
65
|
sessions: {
|
|
66
66
|
sessions: []
|
|
67
67
|
},
|
|
@@ -76,7 +76,7 @@ export const NoActiveSessions: Story = {
|
|
|
76
76
|
*/
|
|
77
77
|
export const SingleSession: Story = {
|
|
78
78
|
globals: {
|
|
79
|
-
|
|
79
|
+
kcContext: {
|
|
80
80
|
sessions: {
|
|
81
81
|
sessions: [
|
|
82
82
|
{
|
|
@@ -100,7 +100,7 @@ export const SingleSession: Story = {
|
|
|
100
100
|
*/
|
|
101
101
|
export const MultipleClientsSession: Story = {
|
|
102
102
|
globals: {
|
|
103
|
-
|
|
103
|
+
kcContext: {
|
|
104
104
|
sessions: {
|
|
105
105
|
sessions: [
|
|
106
106
|
{
|
|
@@ -124,7 +124,7 @@ export const MultipleClientsSession: Story = {
|
|
|
124
124
|
*/
|
|
125
125
|
export const SessionWithoutClients: Story = {
|
|
126
126
|
globals: {
|
|
127
|
-
|
|
127
|
+
kcContext: {
|
|
128
128
|
sessions: {
|
|
129
129
|
sessions: [
|
|
130
130
|
{
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
totp: {
|
|
21
21
|
enabled: false,
|
|
22
22
|
totpSecretEncoded: 'HE4W MSTC OBKU CY2M ONXF OV3Q NYYU I3SH',
|
|
@@ -51,7 +51,7 @@ export const Default: Story = {
|
|
|
51
51
|
|
|
52
52
|
export const WithTotpEnabled: Story = {
|
|
53
53
|
globals: {
|
|
54
|
-
|
|
54
|
+
kcContext: {
|
|
55
55
|
totp: {
|
|
56
56
|
enabled: true,
|
|
57
57
|
totpSecretEncoded: 'G55E MZKC JFUD MQLT MFIF EVSB JFLG M6SO',
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithErrorCode: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
code: {
|
|
22
22
|
success: false,
|
|
23
23
|
error: 'Failed to generate code'
|
|
@@ -27,7 +27,7 @@ export const WithErrorCode: Story = {
|
|
|
27
27
|
};
|
|
28
28
|
export const WithFrenchLanguage: Story = {
|
|
29
29
|
globals: {
|
|
30
|
-
|
|
30
|
+
kcContext: {
|
|
31
31
|
locale: {
|
|
32
32
|
currentLanguageTag: 'fr'
|
|
33
33
|
},
|
|
@@ -41,7 +41,7 @@ export const WithFrenchLanguage: Story = {
|
|
|
41
41
|
|
|
42
42
|
export const WithHtmlErrorMessage: Story = {
|
|
43
43
|
globals: {
|
|
44
|
-
|
|
44
|
+
kcContext: {
|
|
45
45
|
code: {
|
|
46
46
|
success: false,
|
|
47
47
|
error: "Something went wrong. <a href='https://example.com'>Try again</a>"
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithAIAFlow: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
triggered_from_aia: true,
|
|
22
22
|
url: { loginAction: '/login-action' }
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ export const WithAIAFlow: Story = {
|
|
|
26
26
|
|
|
27
27
|
export const WithoutAIAFlow: Story = {
|
|
28
28
|
globals: {
|
|
29
|
-
|
|
29
|
+
kcContext: {
|
|
30
30
|
triggered_from_aia: false,
|
|
31
31
|
url: { loginAction: '/login-action' }
|
|
32
32
|
}
|
|
@@ -35,7 +35,7 @@ export const WithoutAIAFlow: Story = {
|
|
|
35
35
|
|
|
36
36
|
export const WithCustomButtonStyle: Story = {
|
|
37
37
|
globals: {
|
|
38
|
-
|
|
38
|
+
kcContext: {
|
|
39
39
|
triggered_from_aia: true,
|
|
40
40
|
url: { loginAction: '/login-action' }
|
|
41
41
|
}
|