keycloakify 9.6.7 → 9.7.1
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 +8 -6
- package/account/Fallback.js +3 -0
- package/account/Fallback.js.map +1 -1
- package/account/kcContext/KcContext.d.ts +62 -44
- package/account/kcContext/KcContext.js.map +1 -1
- package/account/kcContext/kcContextMocks.js +21 -13
- package/account/kcContext/kcContextMocks.js.map +1 -1
- package/account/pages/Applications.js +1 -1
- package/account/pages/Applications.js.map +1 -1
- package/account/pages/FederatedIdentity.d.ts +7 -0
- package/account/pages/FederatedIdentity.js +8 -0
- package/account/pages/FederatedIdentity.js.map +1 -0
- package/account/pages/Log.js +1 -1
- package/account/pages/Log.js.map +1 -1
- package/account/pages/Sessions.js +0 -4
- package/account/pages/Sessions.js.map +1 -1
- package/account/pages/Totp.js +2 -2
- package/account/pages/Totp.js.map +1 -1
- package/bin/keycloakify/generateFtl/pageId.d.ts +1 -1
- package/bin/keycloakify/generateFtl/pageId.js +9 -1
- package/bin/keycloakify/generateFtl/pageId.js.map +1 -1
- package/bin/keycloakify/keycloakify.js +2 -0
- package/bin/keycloakify/keycloakify.js.map +1 -1
- package/bin/tools/assertNoPnpmDlx.d.ts +1 -0
- package/bin/tools/assertNoPnpmDlx.js +16 -0
- package/bin/tools/assertNoPnpmDlx.js.map +1 -0
- package/package.json +11 -1
- package/src/account/Fallback.tsx +3 -0
- package/src/account/kcContext/KcContext.ts +71 -45
- package/src/account/kcContext/kcContextMocks.ts +20 -14
- package/src/account/pages/Applications.tsx +2 -2
- package/src/account/pages/FederatedIdentity.tsx +58 -0
- package/src/account/pages/Log.tsx +1 -1
- package/src/account/pages/Sessions.tsx +0 -3
- package/src/account/pages/Totp.tsx +20 -21
- package/src/bin/keycloakify/generateFtl/pageId.ts +9 -1
- package/src/bin/keycloakify/keycloakify.ts +3 -0
- package/src/bin/tools/assertNoPnpmDlx.ts +14 -0
package/README.md
CHANGED
@@ -17,9 +17,12 @@
|
|
17
17
|
<a href="https://github.com/thomasdarimont/awesome-keycloak">
|
18
18
|
<img src="https://awesome.re/mentioned-badge.svg"/>
|
19
19
|
</a>
|
20
|
-
<
|
21
|
-
|
22
|
-
|
20
|
+
<p align="center">
|
21
|
+
Check out our discord server!<br/>
|
22
|
+
<a href="https://discord.gg/mJdYJSdcm4">
|
23
|
+
<img src="https://dcbadge.limes.pink/api/server/kYFZG7fQmn"/>
|
24
|
+
</a>
|
25
|
+
</p>
|
23
26
|
<p align="center">
|
24
27
|
<a href="https://www.keycloakify.dev">Home</a>
|
25
28
|
-
|
@@ -38,10 +41,9 @@
|
|
38
41
|
<img width="400" src="https://github.com/keycloakify/keycloakify/assets/6702424/e66d105c-c06f-47d1-8a31-a6ab09da4e80">
|
39
42
|
</p>
|
40
43
|
|
41
|
-
Keycloakify is fully compatible with Keycloak 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, [~~22~~](https://github.com/keycloakify/keycloakify/issues/389#issuecomment-1822509763),
|
44
|
+
Keycloakify is fully compatible with Keycloak 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, [~~22~~](https://github.com/keycloakify/keycloakify/issues/389#issuecomment-1822509763), 23, 24, 25...[and beyond](https://github.com/keycloakify/keycloakify/discussions/346#discussioncomment-5889791)
|
42
45
|
|
43
|
-
> NOTE:
|
44
|
-
> We're actively working on incorporating them into Keycloakify. [Follow progress](https://github.com/keycloakify/keycloakify/pull/538).
|
46
|
+
> NOTE: Keycloakify 10 is still in realase-candidate state. [Follow progress](https://github.com/keycloakify/keycloakify/pull/538).
|
45
47
|
|
46
48
|
## Sponsor
|
47
49
|
|
package/account/Fallback.js
CHANGED
@@ -12,6 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import { lazy, Suspense } from "react";
|
14
14
|
import { assert } from "tsafe/assert";
|
15
|
+
import FederatedIdentity from "./pages/FederatedIdentity";
|
15
16
|
const Password = lazy(() => import("../account/pages/Password"));
|
16
17
|
const Account = lazy(() => import("../account/pages/Account"));
|
17
18
|
const Sessions = lazy(() => import("../account/pages/Sessions"));
|
@@ -34,6 +35,8 @@ export default function Fallback(props) {
|
|
34
35
|
return _jsx(Applications, Object.assign({ kcContext: kcContext }, rest));
|
35
36
|
case "log.ftl":
|
36
37
|
return _jsx(Log, Object.assign({ kcContext: kcContext }, rest));
|
38
|
+
case "federatedIdentity.ftl":
|
39
|
+
return _jsx(FederatedIdentity, Object.assign({ kcContext: kcContext }, rest));
|
37
40
|
}
|
38
41
|
assert(false);
|
39
42
|
})() }));
|
package/account/Fallback.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Fallback.js","sourceRoot":"","sources":["../src/account/Fallback.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,MAAM,EAAe,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"Fallback.js","sourceRoot":"","sources":["../src/account/Fallback.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,MAAM,EAAe,MAAM,cAAc,CAAC;AACnD,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAE1D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,oCAAoC,CAAC,CAAC,CAAC;AAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC;AACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,oCAAoC,CAAC,CAAC,CAAC;AAC1E,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC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-
export type KcContext = KcContext.Password | KcContext.Account | KcContext.Sessions | KcContext.Totp | KcContext.Applications | KcContext.Log;
|
1
|
+
export type KcContext = KcContext.Password | KcContext.Account | KcContext.Sessions | KcContext.Totp | KcContext.Applications | KcContext.Log | KcContext.FederatedIdentity;
|
2
2
|
export declare namespace KcContext {
|
3
3
|
type Common = {
|
4
4
|
themeVersion: string;
|
@@ -21,6 +21,7 @@ export declare namespace KcContext {
|
|
21
21
|
sessionsUrl: string;
|
22
22
|
applicationsUrl: string;
|
23
23
|
logUrl: string;
|
24
|
+
logoutUrl: string;
|
24
25
|
resourceUrl: string;
|
25
26
|
resourcesCommonPath: string;
|
26
27
|
resourcesPath: string;
|
@@ -84,15 +85,6 @@ export declare namespace KcContext {
|
|
84
85
|
username?: string;
|
85
86
|
};
|
86
87
|
properties: Record<string, string | undefined>;
|
87
|
-
sessions: {
|
88
|
-
sessions: {
|
89
|
-
ipAddress: string;
|
90
|
-
started?: any;
|
91
|
-
lastAccess?: any;
|
92
|
-
expires?: any;
|
93
|
-
clients: string[];
|
94
|
-
}[];
|
95
|
-
};
|
96
88
|
};
|
97
89
|
type Password = Common & {
|
98
90
|
pageId: "password.ftl";
|
@@ -116,11 +108,12 @@ export declare namespace KcContext {
|
|
116
108
|
pageId: "sessions.ftl";
|
117
109
|
sessions: {
|
118
110
|
sessions: {
|
119
|
-
|
120
|
-
started?: any;
|
121
|
-
lastAccess?: any;
|
122
|
-
expires?: any;
|
111
|
+
expires: string;
|
123
112
|
clients: string[];
|
113
|
+
ipAddress: string;
|
114
|
+
started: string;
|
115
|
+
lastAccess: string;
|
116
|
+
id: string;
|
124
117
|
}[];
|
125
118
|
};
|
126
119
|
stateChecker: string;
|
@@ -184,10 +177,16 @@ export declare namespace KcContext {
|
|
184
177
|
realmRolesAvailable: {
|
185
178
|
name: string;
|
186
179
|
description: string;
|
180
|
+
compositesStream?: Record<string, unknown>;
|
181
|
+
clientRole?: boolean;
|
182
|
+
composite?: boolean;
|
183
|
+
id?: string;
|
184
|
+
containerId?: string;
|
185
|
+
attributes?: Record<string, unknown>;
|
187
186
|
}[];
|
188
187
|
resourceRolesAvailable: Record<string, {
|
189
188
|
roleName: string;
|
190
|
-
roleDescription
|
189
|
+
roleDescription?: string;
|
191
190
|
clientName: string;
|
192
191
|
clientId: string;
|
193
192
|
}[]>;
|
@@ -195,41 +194,44 @@ export declare namespace KcContext {
|
|
195
194
|
clientScopesGranted: string[];
|
196
195
|
effectiveUrl?: string;
|
197
196
|
client: {
|
198
|
-
|
199
|
-
|
197
|
+
alwaysDisplayInConsole: boolean;
|
198
|
+
attributes: Record<string, unknown>;
|
199
|
+
authenticationFlowBindingOverrides: Record<string, unknown>;
|
200
|
+
baseUrl?: string;
|
200
201
|
bearerOnly: boolean;
|
201
|
-
id: string;
|
202
|
-
protocolMappersStream: Record<string, unknown>;
|
203
|
-
includeInTokenScope: boolean;
|
204
|
-
redirectUris: string[];
|
205
|
-
fullScopeAllowed: boolean;
|
206
|
-
registeredNodes: Record<string, unknown>;
|
207
|
-
enabled: boolean;
|
208
202
|
clientAuthenticatorType: string;
|
209
|
-
realmScopeMappingsStream: Record<string, unknown>;
|
210
|
-
scopeMappingsStream: Record<string, unknown>;
|
211
|
-
displayOnConsentScreen: boolean;
|
212
203
|
clientId: string;
|
213
|
-
rootUrl: string;
|
214
|
-
authenticationFlowBindingOverrides: Record<string, unknown>;
|
215
|
-
standardFlowEnabled: boolean;
|
216
|
-
attributes: Record<string, unknown>;
|
217
|
-
publicClient: boolean;
|
218
|
-
alwaysDisplayInConsole: boolean;
|
219
204
|
consentRequired: boolean;
|
220
|
-
|
221
|
-
|
222
|
-
protocol: string;
|
223
|
-
dynamicScope: boolean;
|
205
|
+
consentScreenText: string;
|
206
|
+
description: string;
|
224
207
|
directAccessGrantsEnabled: boolean;
|
225
|
-
|
226
|
-
|
208
|
+
displayOnConsentScreen: boolean;
|
209
|
+
dynamicScope: boolean;
|
210
|
+
enabled: boolean;
|
227
211
|
frontchannelLogout: boolean;
|
228
|
-
|
212
|
+
fullScopeAllowed: boolean;
|
213
|
+
id: string;
|
229
214
|
implicitFlowEnabled: boolean;
|
230
|
-
|
231
|
-
|
215
|
+
includeInTokenScope: boolean;
|
216
|
+
managementUrl: string;
|
217
|
+
name?: string;
|
218
|
+
nodeReRegistrationTimeout: string;
|
219
|
+
notBefore: string;
|
220
|
+
protocol: string;
|
221
|
+
protocolMappersStream: Record<string, unknown>;
|
222
|
+
publicClient: boolean;
|
232
223
|
realm: Record<string, unknown>;
|
224
|
+
realmScopeMappingsStream: Record<string, unknown>;
|
225
|
+
redirectUris: string[];
|
226
|
+
registeredNodes: Record<string, unknown>;
|
227
|
+
rolesStream: Record<string, unknown>;
|
228
|
+
rootUrl?: string;
|
229
|
+
scopeMappingsStream: Record<string, unknown>;
|
230
|
+
secret: string;
|
231
|
+
serviceAccountsEnabled: boolean;
|
232
|
+
standardFlowEnabled: boolean;
|
233
|
+
surrogateAuthRequired: boolean;
|
234
|
+
webOrigins: string[];
|
233
235
|
};
|
234
236
|
}[];
|
235
237
|
};
|
@@ -241,9 +243,25 @@ export declare namespace KcContext {
|
|
241
243
|
date: string | number | Date;
|
242
244
|
event: string;
|
243
245
|
ipAddress: string;
|
244
|
-
client:
|
245
|
-
details:
|
246
|
+
client: string;
|
247
|
+
details: {
|
248
|
+
value: string;
|
249
|
+
key: string;
|
250
|
+
}[];
|
251
|
+
}[];
|
252
|
+
};
|
253
|
+
};
|
254
|
+
type FederatedIdentity = Common & {
|
255
|
+
pageId: "federatedIdentity.ftl";
|
256
|
+
stateChecker: string;
|
257
|
+
federatedIdentity: {
|
258
|
+
identities: {
|
259
|
+
providerId: string;
|
260
|
+
displayName: string;
|
261
|
+
userName: string;
|
262
|
+
connected: boolean;
|
246
263
|
}[];
|
264
|
+
removeLinkPossible: boolean;
|
247
265
|
};
|
248
266
|
};
|
249
267
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"KcContext.js","sourceRoot":"","sources":["../../src/account/kcContext/KcContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"KcContext.js","sourceRoot":"","sources":["../../src/account/kcContext/KcContext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAgStC;IAOI,MAAM,EAA4B,CAAC;IACnC,MAAM,EAAiC,CAAC;CAC3C;AAED,MAAM,EAA2D,CAAC"}
|
@@ -14,6 +14,7 @@ export const kcContextCommonMock = {
|
|
14
14
|
"resourceUrl": "#",
|
15
15
|
"accountUrl": "#",
|
16
16
|
"applicationsUrl": "#",
|
17
|
+
"logoutUrl": "#",
|
17
18
|
"getLogoutUrl": () => "#",
|
18
19
|
"logUrl": "#",
|
19
20
|
"passwordUrl": "#",
|
@@ -152,17 +153,6 @@ export const kcContextCommonMock = {
|
|
152
153
|
"styles": "css/account.css img/icon-sidebar-active.png img/logo.png resources-common/node_modules/patternfly/dist/css/patternfly.min.css resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css",
|
153
154
|
"kcButtonClass": "btn",
|
154
155
|
"kcButtonDefaultClass": "btn-default"
|
155
|
-
},
|
156
|
-
"sessions": {
|
157
|
-
"sessions": [
|
158
|
-
{
|
159
|
-
"ipAddress": "127.0.0.1",
|
160
|
-
"started": new Date().toString(),
|
161
|
-
"lastAccess": new Date().toString(),
|
162
|
-
"expires": new Date().toString(),
|
163
|
-
"clients": ["Chrome", "Firefox"]
|
164
|
-
}
|
165
|
-
]
|
166
156
|
}
|
167
157
|
};
|
168
158
|
export const kcContextMocks = [
|
@@ -172,7 +162,14 @@ export const kcContextMocks = [
|
|
172
162
|
id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "account.ftl", "url": Object.assign(Object.assign({}, kcContextCommonMock.url), { "referrerURI": "#", "accountUrl": "#" }), "realm": Object.assign(Object.assign({}, kcContextCommonMock.realm), { "registrationEmailAsUsername": true, "editUsernameAllowed": true }), "stateChecker": "" })),
|
173
163
|
id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "sessions.ftl", "sessions": {
|
174
164
|
"sessions": [
|
175
|
-
|
165
|
+
{
|
166
|
+
"ipAddress": "127.0.0.1",
|
167
|
+
"started": new Date().toString(),
|
168
|
+
"lastAccess": new Date().toString(),
|
169
|
+
"expires": new Date().toString(),
|
170
|
+
"clients": ["Chrome", "Firefox"],
|
171
|
+
"id": "f8951177-817d-4a70-9c02-86d3c170fe51"
|
172
|
+
}
|
176
173
|
]
|
177
174
|
}, "stateChecker": "g6WB1FaYnKotTkiy7ZrlxvFztSqS0U8jvHsOOOb2z4g" })),
|
178
175
|
id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "totp.ftl", "totp": {
|
@@ -199,9 +196,20 @@ export const kcContextMocks = [
|
|
199
196
|
"event": "login",
|
200
197
|
"ipAddress": "172.17.0.1",
|
201
198
|
"client": "security-admin-console",
|
202
|
-
"details": [
|
199
|
+
"details": [{ key: "openid-connect", value: "admin" }]
|
203
200
|
}
|
204
201
|
]
|
202
|
+
} })),
|
203
|
+
id(Object.assign(Object.assign({}, kcContextCommonMock), { "stateChecker": "", "pageId": "federatedIdentity.ftl", "federatedIdentity": {
|
204
|
+
"identities": [
|
205
|
+
{
|
206
|
+
"providerId": "keycloak-oidc",
|
207
|
+
"displayName": "keycloak-oidc",
|
208
|
+
"userName": "John",
|
209
|
+
"connected": true
|
210
|
+
}
|
211
|
+
],
|
212
|
+
"removeLinkPossible": true
|
205
213
|
} }))
|
206
214
|
];
|
207
215
|
//# sourceMappingURL=kcContextMocks.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"kcContextMocks.js","sourceRoot":"","sources":["../../src/account/kcContext/kcContextMocks.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,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+14,7 @@ export default function Applications(props) {
|
|
14
14
|
const { msg, advancedMsg } = i18n;
|
15
15
|
return (_jsx(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { active: "applications" }, { children: _jsxs("div", Object.assign({ className: "row" }, { children: [_jsx("div", Object.assign({ className: "col-md-10" }, { children: _jsx("h2", { children: msg("applicationsHtmlTitle") }) })), _jsxs("form", Object.assign({ action: url.applicationsUrl, method: "post" }, { children: [_jsx("input", { type: "hidden", id: "stateChecker", name: "stateChecker", value: stateChecker }), _jsx("input", { type: "hidden", id: "referrer", name: "referrer", value: stateChecker }), _jsxs("table", Object.assign({ className: "table table-striped table-bordered" }, { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("td", { children: msg("application") }), _jsx("td", { children: msg("availableRoles") }), _jsx("td", { children: msg("grantedPermissions") }), _jsx("td", { children: msg("additionalGrants") }), _jsx("td", { children: msg("action") })] }) }), _jsx("tbody", { children: applications.map(application => (_jsxs("tr", { children: [_jsxs("td", { children: [application.effectiveUrl && (_jsx("a", Object.assign({ href: application.effectiveUrl }, { children: (application.client.name && advancedMsg(application.client.name)) || application.client.clientId }))), !application.effectiveUrl &&
|
16
16
|
((application.client.name && advancedMsg(application.client.name)) || application.client.clientId)] }), _jsxs("td", { children: [!isArrayWithEmptyObject(application.realmRolesAvailable) &&
|
17
|
-
application.realmRolesAvailable.map(role => (_jsxs("span", { children: [role.description ? advancedMsg(role.description) : advancedMsg(role.name),
|
17
|
+
application.realmRolesAvailable.map((role, index) => (_jsxs("span", { children: [role.description ? advancedMsg(role.description) : advancedMsg(role.name), index < application.realmRolesAvailable.length - 1 && ", "] }, role.name))), !isArrayWithEmptyObject(application.realmRolesAvailable) && application.resourceRolesAvailable && ", ", application.resourceRolesAvailable &&
|
18
18
|
Object.keys(application.resourceRolesAvailable).map(resource => (_jsxs("span", { children: [!isArrayWithEmptyObject(application.realmRolesAvailable) && ", ", application.resourceRolesAvailable[resource].map(clientRole => (_jsxs("span", { children: [clientRole.roleDescription
|
19
19
|
? advancedMsg(clientRole.roleDescription)
|
20
20
|
: advancedMsg(clientRole.roleName), " ", msg("inResource"), " ", _jsx("strong", { children: clientRole.clientName ? advancedMsg(clientRole.clientName) : clientRole.clientId }), clientRole !==
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Applications.js","sourceRoot":"","sources":["../../src/account/pages/Applications.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI1E,SAAS,sBAAsB,CAAC,QAAa;IACzC,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACxI,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAA0E;IAC3G,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC;QACrC,eAAe;QACf,OAAO;KACV,CAAC,CAAC;IAEH,MAAM,EACF,GAAG,EACH,YAAY,EAAE,EAAE,YAAY,EAAE,EAC9B,YAAY,EACf,GAAG,SAAS,CAAC;IAEd,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAElC,OAAO,CACH,KAAC,QAAQ,oBAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAE,MAAM,EAAC,cAAc,gBAC9E,6BAAK,SAAS,EAAC,KAAK,iBAChB,4BAAK,SAAS,EAAC,WAAW,gBACtB,uBAAK,GAAG,CAAC,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AAC,CAAC,IAAI,IAAI,KAFvF,KAAK,CAGT,CACV,CAAC,CACL,CAAC,CAAC,CAAC,CACA,2BAAS,GAAG,CAAC,YAAY,CAAC,GAAU,CACvC,GACA,EAEL,uBACK,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACvC,2BACK,WAAW,CAAC,KAAK,CAAC,EAClB,KAAK,KAAK,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,KAFjF,KAAK,CAGT,CACV,CAAC,GACD,EAEL,uBACK,CAAC,WAAW,CAAC,MAAM,CAAC,eAAe,IAAI,WAAW,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC;oDACnF,WAAW,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACtC,+BACI,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,EACpF,EAAE,EAAE,UAAU,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,EAC3C,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,gBAE3B,GAAG,CAAC,QAAQ,CAAC,IACT,CACZ,CAAC,CAAC,CAAC,IAAI,GACP,KA9EA,WAAW,CAAC,MAAM,CAAC,QAAQ,CA+E/B,CACR,CAAC,GACE,KACJ,KACL,KACL,IACC,CACd,CAAC;AACN,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { PageProps } from "../../account";
|
3
|
+
import { I18n } from "../../account/i18n";
|
4
|
+
import { KcContext } from "../../account/kcContext";
|
5
|
+
export default function FederatedIdentity(props: PageProps<Extract<KcContext, {
|
6
|
+
pageId: "federatedIdentity.ftl";
|
7
|
+
}>, I18n>): JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
export default function FederatedIdentity(props) {
|
3
|
+
const { kcContext, i18n, doUseDefaultCss, classes, Template } = props;
|
4
|
+
const { url, federatedIdentity, stateChecker } = kcContext;
|
5
|
+
const { msg } = i18n;
|
6
|
+
return (_jsx(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { active: "federatedIdentity" }, { children: _jsxs("div", Object.assign({ className: "main-layout social" }, { children: [_jsx("div", Object.assign({ className: "row" }, { children: _jsx("div", Object.assign({ className: "col-md-10" }, { children: _jsx("h2", { children: msg("federatedIdentitiesHtmlTitle") }) })) })), _jsx("div", Object.assign({ id: "federated-identities" }, { children: federatedIdentity.identities.map(identity => (_jsxs("div", Object.assign({ className: "row margin-bottom" }, { children: [_jsx("div", Object.assign({ className: "col-sm-2 col-md-2" }, { children: _jsx("label", Object.assign({ htmlFor: identity.providerId, className: "control-label" }, { children: identity.displayName })) })), _jsx("div", Object.assign({ className: "col-sm-5 col-md-5" }, { children: _jsx("input", { disabled: true, className: "form-control", value: identity.userName }) })), _jsx("div", Object.assign({ className: "col-sm-5 col-md-5" }, { children: identity.connected ? (federatedIdentity.removeLinkPossible && (_jsxs("form", Object.assign({ action: url.socialUrl, method: "post", className: "form-inline" }, { children: [_jsx("input", { type: "hidden", name: "stateChecker", value: stateChecker }), _jsx("input", { type: "hidden", name: "action", value: "remove" }), _jsx("input", { type: "hidden", name: "providerId", value: identity.providerId }), _jsx("button", Object.assign({ id: `remove-link-${identity.providerId}`, className: "btn btn-default" }, { children: msg("doRemove") }))] })))) : (_jsxs("form", Object.assign({ action: url.socialUrl, method: "post", className: "form-inline" }, { children: [_jsx("input", { type: "hidden", name: "stateChecker", value: stateChecker }), _jsx("input", { type: "hidden", name: "action", value: "add" }), _jsx("input", { type: "hidden", name: "providerId", value: identity.providerId }), _jsx("button", Object.assign({ id: `add-link-${identity.providerId}`, className: "btn btn-default" }, { children: msg("doAdd") }))] }))) }))] }), identity.providerId))) }))] })) })));
|
7
|
+
}
|
8
|
+
//# sourceMappingURL=FederatedIdentity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FederatedIdentity.js","sourceRoot":"","sources":["../../src/account/pages/FederatedIdentity.tsx"],"names":[],"mappings":";AAIA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAA+E;IACrH,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,EAAE,GAAG,EAAE,iBAAiB,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3D,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACrB,OAAO,CACH,KAAC,QAAQ,oBAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAE,MAAM,EAAC,mBAAmB,gBACnF,6BAAK,SAAS,EAAC,oBAAoB,iBAC/B,4BAAK,SAAS,EAAC,KAAK,gBAChB,4BAAK,SAAS,EAAC,WAAW,gBACtB,uBAAK,GAAG,CAAC,8BAA8B,CAAC,GAAM,IAC5C,IACJ,EACN,4BAAK,EAAE,EAAC,sBAAsB,gBACzB,iBAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAC1C,6BAA+B,SAAS,EAAC,mBAAmB,iBACxD,4BAAK,SAAS,EAAC,mBAAmB,gBAC9B,8BAAO,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,SAAS,EAAC,eAAe,gBACzD,QAAQ,CAAC,WAAW,IACjB,IACN,EACN,4BAAK,SAAS,EAAC,mBAAmB,gBAC9B,gBAAO,QAAQ,QAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,GAAI,IACnE,EACN,4BAAK,SAAS,EAAC,mBAAmB,gBAC7B,QAA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|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useGetClassName } from "
|
2
|
+
import { useGetClassName } from "../../account/lib/useGetClassName";
|
3
3
|
export default function Log(props) {
|
4
4
|
const { kcContext, i18n, doUseDefaultCss, classes, Template } = props;
|
5
5
|
const { getClassName } = useGetClassName({
|
package/account/pages/Log.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Log.js","sourceRoot":"","sources":["../../src/account/pages/Log.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"Log.js","sourceRoot":"","sources":["../../src/account/pages/Log.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,KAAiE;IACzF,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC;QACrC,eAAe;QACf,OAAO;KACV,CAAC,CAAC;IAEH,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;IAE1B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAErB,OAAO,CACH,KAAC,QAAQ,oBAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAE,MAAM,EAAC,KAAK,gBACrE,6BAAK,SAAS,EAAE,YAAY,CAAC,uBAAuB,CAAC,iBACjD,4BAAK,SAAS,EAAC,WAAW,gBACtB,uBAAK,GAAG,CAAC,qBAAqB,CAAC,GAAM,IACnC,EAEN,+BAAO,SAAS,EAAC,oCAAoC,iBACjD,0BACI,yBACI,uBAAK,GAAG,CAAC,MAAM,CAAC,GAAM,EACtB,uBAAK,GAAG,CAAC,OAAO,CAAC,GAAM,EACvB,uBAAK,GAAG,CAAC,IAAI,CAAC,GAAM,EACpB,uBAAK,GAAG,CAAC,QAAQ,CAAC,GAAM,EACxB,uBAAK,GAAG,CAAC,SAAS,CAAC,GAAM,IACxB,GACD,EAER,0BACK,GAAG,CAAC,MAAM,CAAC,GAAG,CACX,CACI,KAMC,EACD,KAA6B,EAC/B,EAAE,CAAC,CACD,yBACI,uBAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,GAAM,EAClE,uBAAK,KAAK,CAAC,KAAK,GAAM,EACtB,uBAAK,KAAK,CAAC,SAAS,GAAM,EAC1B,uBAAK,KAAK,CAAC,MAAM,IAAI,EAAE,GAAM,EAC7B,uBACK,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CACxC,2BACK,GAAG,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE,EACjC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,KAFxC,WAAW,CAGf,CACV,CAAC,GACD,KAZA,KAAK,CAaT,CACR,CACJ,GACG,KACJ,KACN,IACC,CACd,CAAC;AACN,CAAC"}
|
@@ -2,17 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { clsx } from "../../tools/clsx";
|
3
3
|
import { useGetClassName } from "../../account/lib/useGetClassName";
|
4
4
|
export default function Sessions(props) {
|
5
|
-
var _a;
|
6
5
|
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;
|
7
6
|
const { getClassName } = useGetClassName({
|
8
7
|
doUseDefaultCss,
|
9
8
|
classes
|
10
9
|
});
|
11
|
-
console.log({ kcContext });
|
12
10
|
const { url, stateChecker, sessions } = kcContext;
|
13
11
|
const { msg } = i18n;
|
14
|
-
console.log({ sdf: (_a = kcContext.locale) === null || _a === void 0 ? void 0 : _a.supported });
|
15
|
-
console.log({ asdf: "asdf" });
|
16
12
|
return (_jsxs(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { active: "sessions" }, { children: [_jsx("div", Object.assign({ className: getClassName("kcContentWrapperClass") }, { children: _jsx("div", Object.assign({ className: "col-md-10" }, { children: _jsx("h2", { children: msg("sessionsHtmlTitle") }) })) })), _jsxs("table", Object.assign({ className: "table table-striped table-bordered" }, { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: msg("ip") }), _jsx("th", { children: msg("started") }), _jsx("th", { children: msg("lastAccess") }), _jsx("th", { children: msg("expires") }), _jsx("th", { children: msg("clients") })] }) }), _jsx("tbody", Object.assign({ role: "rowgroup" }, { children: sessions.sessions.map((session, index) => (_jsxs("tr", { children: [_jsx("td", { children: session.ipAddress }), _jsx("td", { children: session === null || session === void 0 ? void 0 : session.started }), _jsx("td", { children: session === null || session === void 0 ? void 0 : session.lastAccess }), _jsx("td", { children: session === null || session === void 0 ? void 0 : session.expires }), _jsx("td", { children: session.clients.map((client, clientIndex) => (_jsxs("div", { children: [client, _jsx("br", {})] }, clientIndex))) })] }, index))) }))] })), _jsxs("form", Object.assign({ action: url.sessionsUrl, method: "post" }, { children: [_jsx("input", { type: "hidden", id: "stateChecker", name: "stateChecker", value: stateChecker }), _jsx("button", Object.assign({ id: "logout-all-sessions", type: "submit", className: clsx(getClassName("kcButtonDefaultClass"), getClassName("kcButtonClass")) }, { children: msg("doLogOutAllSessions") }))] }))] })));
|
17
13
|
}
|
18
14
|
//# sourceMappingURL=Sessions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Sessions.js","sourceRoot":"","sources":["../../src/account/pages/Sessions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI1E,MAAM,CAAC,OAA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C,yBACI,uBAAK,OAAO,CAAC,SAAS,GAAM,EAC5B,uBAAK,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,GAAM,EAC3B,uBAAK,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,GAAM,EAC9B,uBAAK,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,GAAM,EAC3B,uBACK,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,WAAmB,EAAE,EAAE,CAAC,CAC1D,0BACK,MAAM,EACP,cAAM,KAFA,WAAW,CAGf,CACT,CAAC,GACD,KAZA,KAAK,CAaT,CACR,CAAC,IACE,KACJ,EAER,8BAAM,MAAM,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,EAAC,MAAM,iBACxC,gBAAO,IAAI,EAAC,QAAQ,EAAC,EAAE,EAAC,cAAc,EAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAE,YAAY,GAAI,EAClF,+BAAQ,EAAE,EAAC,qBAAqB,EAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC,gBAC9H,GAAG,CAAC,qBAAqB,CAAC,IACtB,KACN,KACA,CACd,CAAC;AACN,CAAC"}
|
package/account/pages/Totp.js
CHANGED
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
2
2
|
import { clsx } from "../../tools/clsx";
|
3
3
|
import { useGetClassName } from "../../account/lib/useGetClassName";
|
4
4
|
export default function Totp(props) {
|
5
|
-
var _a;
|
5
|
+
var _a, _b;
|
6
6
|
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;
|
7
7
|
const { getClassName } = useGetClassName({
|
8
8
|
doUseDefaultCss,
|
@@ -15,6 +15,6 @@ export default function Totp(props) {
|
|
15
15
|
"HmacSHA256": "SHA256",
|
16
16
|
"HmacSHA512": "SHA512"
|
17
17
|
};
|
18
|
-
return (_jsx(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { active: "totp" }, { children: _jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: "row" }, { children: [_jsx("div", Object.assign({ className: "col-md-10" }, { children: _jsx("h2", { children: msg("authenticatorTitle") }) })), totp.otpCredentials.length === 0 && (_jsxs("div", Object.assign({ className: "subtitle col-md-2" }, { children: [_jsx("span", Object.assign({ className: "required" }, { children: "*" })), msg("requiredFields")] })))] })), totp.enabled && (_jsxs("table", Object.assign({ className: "table table-bordered table-striped" }, { children: [_jsx("thead", { children: totp.otpCredentials.length > 1 ? (_jsx("tr", { children: _jsx("th", Object.assign({ colSpan: 4 }, { children: msg("configureAuthenticators") })) })) : (_jsx("tr", { children: _jsx("th", Object.assign({ colSpan: 3 }, { children: msg("configureAuthenticators") })) })) }), _jsx("tbody", { children: totp.otpCredentials.map((credential, index) => (_jsxs("tr", { children: [_jsx("td", Object.assign({ className: "provider" }, { children: msg("mobile") })), totp.otpCredentials.length > 1 && _jsx("td", Object.assign({ className: "provider" }, { children: credential.id })), _jsx("td", Object.assign({ className: "provider" }, { children: credential.userLabel || "" })), _jsx("td", Object.assign({ className: "action" }, { children: _jsxs("form", Object.assign({ action: url.totpUrl, method: "post", className: "form-inline" }, { children: [_jsx("input", { type: "hidden", id: "stateChecker", name: "stateChecker", value: stateChecker }), _jsx("input", { type: "hidden", id: "submitAction", name: "submitAction", value: "Delete" }), _jsx("input", { type: "hidden", id: "credentialId", name: "credentialId", value: credential.id }), _jsx("button", Object.assign({ id: `remove-mobile-${index}`, className: "btn btn-default" }, { children: _jsx("i", { className: "pficon pficon-delete" }) }))] })) }))] }, index))) })] }))), !totp.enabled && (_jsxs("div", { children: [_jsx("hr", {}), _jsxs("ol", Object.assign({ id: "kc-totp-settings" }, { children: [_jsxs("li", { children: [_jsx("p", { children: msg("totpStep1") }), _jsx("ul", Object.assign({ id: "kc-totp-supported-apps" }, { children: totp.supportedApplications.map(app => (_jsx("li", { children: msg(app) }, app))) }))] }), mode && mode == "manual" ? (_jsxs(_Fragment, { children: [_jsxs("li", { children: [_jsx("p", { children: msg("totpManualStep2") }), _jsx("p", { children: _jsx("span", Object.assign({ id: "kc-totp-secret-key" }, { children: totp.totpSecretEncoded })) }), _jsx("p", { children: _jsx("a", Object.assign({ href: totp.qrUrl, id: "mode-barcode" }, { children: msg("totpScanBarcode") })) })] }), _jsxs("li", { children: [_jsx("p", { children: msg("totpManualStep3") }),
|
18
|
+
return (_jsx(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { active: "totp" }, { children: _jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: "row" }, { children: [_jsx("div", Object.assign({ className: "col-md-10" }, { children: _jsx("h2", { children: msg("authenticatorTitle") }) })), totp.otpCredentials.length === 0 && (_jsxs("div", Object.assign({ className: "subtitle col-md-2" }, { children: [_jsx("span", Object.assign({ className: "required" }, { children: "*" })), msg("requiredFields")] })))] })), totp.enabled && (_jsxs("table", Object.assign({ className: "table table-bordered table-striped" }, { children: [_jsx("thead", { children: totp.otpCredentials.length > 1 ? (_jsx("tr", { children: _jsx("th", Object.assign({ colSpan: 4 }, { children: msg("configureAuthenticators") })) })) : (_jsx("tr", { children: _jsx("th", Object.assign({ colSpan: 3 }, { children: msg("configureAuthenticators") })) })) }), _jsx("tbody", { children: totp.otpCredentials.map((credential, index) => (_jsxs("tr", { children: [_jsx("td", Object.assign({ className: "provider" }, { children: msg("mobile") })), totp.otpCredentials.length > 1 && _jsx("td", Object.assign({ className: "provider" }, { children: credential.id })), _jsx("td", Object.assign({ className: "provider" }, { children: credential.userLabel || "" })), _jsx("td", Object.assign({ className: "action" }, { children: _jsxs("form", Object.assign({ action: url.totpUrl, method: "post", className: "form-inline" }, { children: [_jsx("input", { type: "hidden", id: "stateChecker", name: "stateChecker", value: stateChecker }), _jsx("input", { type: "hidden", id: "submitAction", name: "submitAction", value: "Delete" }), _jsx("input", { type: "hidden", id: "credentialId", name: "credentialId", value: credential.id }), _jsx("button", Object.assign({ id: `remove-mobile-${index}`, className: "btn btn-default" }, { children: _jsx("i", { className: "pficon pficon-delete" }) }))] })) }))] }, index))) })] }))), !totp.enabled && (_jsxs("div", { children: [_jsx("hr", {}), _jsxs("ol", Object.assign({ id: "kc-totp-settings" }, { children: [_jsxs("li", { children: [_jsx("p", { children: msg("totpStep1") }), _jsx("ul", Object.assign({ id: "kc-totp-supported-apps" }, { children: (_a = totp.supportedApplications) === null || _a === void 0 ? void 0 : _a.map(app => (_jsx("li", { children: msg(app) }, app))) }))] }), mode && mode == "manual" ? (_jsxs(_Fragment, { children: [_jsxs("li", { children: [_jsx("p", { children: msg("totpManualStep2") }), _jsx("p", { children: _jsx("span", Object.assign({ id: "kc-totp-secret-key" }, { children: totp.totpSecretEncoded })) }), _jsx("p", { children: _jsx("a", Object.assign({ href: totp.qrUrl, id: "mode-barcode" }, { children: msg("totpScanBarcode") })) })] }), _jsxs("li", { children: [_jsx("p", { children: msg("totpManualStep3") }), _jsxs("ul", { children: [_jsxs("li", Object.assign({ id: "kc-totp-type" }, { children: [msg("totpType"), ": ", msg(`totp.${totp.policy.type}`)] })), _jsxs("li", Object.assign({ id: "kc-totp-algorithm" }, { children: [msg("totpAlgorithm"), ": ", (_b = algToKeyUriAlg === null || algToKeyUriAlg === void 0 ? void 0 : algToKeyUriAlg[totp.policy.algorithm]) !== null && _b !== void 0 ? _b : totp.policy.algorithm] })), _jsxs("li", Object.assign({ id: "kc-totp-digits" }, { children: [msg("totpDigits"), ": ", totp.policy.digits] })), totp.policy.type === "totp" ? (_jsxs("li", Object.assign({ id: "kc-totp-period" }, { children: [msg("totpInterval"), ": ", totp.policy.period] }))) : (_jsxs("li", Object.assign({ id: "kc-totp-counter" }, { children: [msg("totpCounter"), ": ", totp.policy.initialCounter] })))] })] })] })) : (_jsxs("li", { children: [_jsx("p", { children: msg("totpStep2") }), _jsx("p", { children: _jsx("img", { id: "kc-totp-secret-qr-code", src: `data:image/png;base64, ${totp.totpSecretQrCode}`, alt: "Figure: Barcode" }) }), _jsx("p", { children: _jsx("a", Object.assign({ href: totp.manualUrl, id: "mode-manual" }, { children: msg("totpUnableToScan") })) })] })), _jsxs("li", { children: [_jsx("p", { children: msg("totpStep3") }), _jsx("p", { children: msg("totpStep3DeviceName") })] })] })), _jsx("hr", {}), _jsxs("form", Object.assign({ action: url.totpUrl, className: getClassName("kcFormClass"), id: "kc-totp-settings-form", method: "post" }, { children: [_jsx("input", { type: "hidden", id: "stateChecker", name: "stateChecker", value: stateChecker }), _jsxs("div", Object.assign({ className: getClassName("kcFormGroupClass") }, { children: [_jsxs("div", Object.assign({ className: "col-sm-2 col-md-2" }, { children: [_jsx("label", Object.assign({ htmlFor: "totp", className: "control-label" }, { children: msg("authenticatorCode") })), _jsx("span", Object.assign({ className: "required" }, { children: "*" }))] })), _jsxs("div", Object.assign({ className: "col-sm-10 col-md-10" }, { children: [_jsx("input", { type: "text", id: "totp", name: "totp", autoComplete: "off", className: getClassName("kcInputClass"), "aria-invalid": messagesPerField.existsError("totp") }), messagesPerField.existsError("totp") && (_jsx("span", Object.assign({ id: "input-error-otp-code", className: getClassName("kcInputErrorMessageClass"), "aria-live": "polite" }, { children: messagesPerField.get("totp") })))] })), _jsx("input", { type: "hidden", id: "totpSecret", name: "totpSecret", value: totp.totpSecret }), mode && _jsx("input", { type: "hidden", id: "mode", value: mode })] })), _jsxs("div", Object.assign({ className: getClassName("kcFormGroupClass") }, { children: [_jsxs("div", Object.assign({ className: "col-sm-2 col-md-2" }, { children: [_jsx("label", Object.assign({ htmlFor: "userLabel", className: getClassName("kcLabelClass") }, { children: msg("totpDeviceName") })), totp.otpCredentials.length >= 1 && _jsx("span", Object.assign({ className: "required" }, { children: "*" }))] })), _jsxs("div", Object.assign({ className: "col-sm-10 col-md-10" }, { children: [_jsx("input", { type: "text", id: "userLabel", name: "userLabel", autoComplete: "off", className: getClassName("kcInputClass"), "aria-invalid": messagesPerField.existsError("userLabel") }), messagesPerField.existsError("userLabel") && (_jsx("span", Object.assign({ id: "input-error-otp-label", className: getClassName("kcInputErrorMessageClass"), "aria-live": "polite" }, { children: messagesPerField.get("userLabel") })))] }))] })), _jsx("div", Object.assign({ id: "kc-form-buttons", className: clsx(getClassName("kcFormGroupClass"), "text-right") }, { children: _jsxs("div", Object.assign({ className: getClassName("kcInputWrapperClass") }, { children: [_jsx("input", { type: "submit", className: clsx(getClassName("kcButtonClass"), getClassName("kcButtonPrimaryClass"), getClassName("kcButtonLargeClass")), id: "saveTOTPBtn", value: msgStr("doSave") }), _jsx("button", Object.assign({ type: "submit", className: clsx(getClassName("kcButtonClass"), getClassName("kcButtonDefaultClass"), getClassName("kcButtonLargeClass"), getClassName("kcButtonLargeClass")), id: "cancelTOTPBtn", name: "submitAction", value: "Cancel" }, { children: msg("doCancel") }))] })) }))] }))] }))] }) })));
|
19
19
|
}
|
20
20
|
//# sourceMappingURL=Totp.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Totp.js","sourceRoot":"","sources":["../../src/account/pages/Totp.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK1E,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAkE;;IAC3F,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"Totp.js","sourceRoot":"","sources":["../../src/account/pages/Totp.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK1E,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAkE;;IAC3F,MAAM,EAAE,SAAS,E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ACb,SAAS,EAAE,IAAI,CACX,YAAY,CAAC,eAAe,CAAC,EAC7B,YAAY,CAAC,sBAAsB,CAAC,EACpC,YAAY,CAAC,oBAAoB,CAAC,CACrC,EACD,EAAE,EAAC,aAAa,EAChB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,GACzB,EACF,+BACI,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CACX,YAAY,CAAC,eAAe,CAAC,EAC7B,YAAY,CAAC,sBAAsB,CAAC,EACpC,YAAY,CAAC,oBAAoB,CAAC,EAClC,YAAY,CAAC,oBAAoB,CAAC,CACrC,EACD,EAAE,EAAC,eAAe,EAClB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,QAAQ,gBAEb,GAAG,CAAC,UAAU,CAAC,IACX,KACP,IACJ,KACH,IACL,CACT,IACF,IACI,CACd,CAAC;AACN,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
export declare const loginThemePageIds: readonly ["login.ftl", "login-username.ftl", "login-password.ftl", "webauthn-authenticate.ftl", "register.ftl", "register-user-profile.ftl", "info.ftl", "error.ftl", "login-reset-password.ftl", "login-verify-email.ftl", "terms.ftl", "login-oauth2-device-verify-user-code.ftl", "login-oauth-grant.ftl", "login-otp.ftl", "login-update-profile.ftl", "login-update-password.ftl", "login-idp-link-confirm.ftl", "login-idp-link-email.ftl", "login-page-expired.ftl", "login-config-totp.ftl", "logout-confirm.ftl", "update-user-profile.ftl", "idp-review-user-profile.ftl", "update-email.ftl", "select-authenticator.ftl", "saml-post-form.ftl"];
|
2
|
-
export declare const accountThemePageIds: readonly ["password.ftl", "account.ftl", "sessions.ftl", "totp.ftl", "applications.ftl", "log.ftl"];
|
2
|
+
export declare const accountThemePageIds: readonly ["password.ftl", "account.ftl", "sessions.ftl", "totp.ftl", "applications.ftl", "log.ftl", "federatedIdentity.ftl"];
|
3
3
|
export type LoginThemePageId = (typeof loginThemePageIds)[number];
|
4
4
|
export type AccountThemePageId = (typeof accountThemePageIds)[number];
|
@@ -29,5 +29,13 @@ exports.loginThemePageIds = [
|
|
29
29
|
"select-authenticator.ftl",
|
30
30
|
"saml-post-form.ftl"
|
31
31
|
];
|
32
|
-
exports.accountThemePageIds = [
|
32
|
+
exports.accountThemePageIds = [
|
33
|
+
"password.ftl",
|
34
|
+
"account.ftl",
|
35
|
+
"sessions.ftl",
|
36
|
+
"totp.ftl",
|
37
|
+
"applications.ftl",
|
38
|
+
"log.ftl",
|
39
|
+
"federatedIdentity.ftl"
|
40
|
+
];
|
33
41
|
//# sourceMappingURL=pageId.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pageId.js","sourceRoot":"","sources":["../../../src/bin/keycloakify/generateFtl/pageId.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC7B,WAAW;IACX,oBAAoB;IACpB,oBAAoB;IACpB,2BAA2B;IAC3B,cAAc;IACd,2BAA2B;IAC3B,UAAU;IACV,WAAW;IACX,0BAA0B;IAC1B,wBAAwB;IACxB,WAAW;IACX,0CAA0C;IAC1C,uBAAuB;IACvB,eAAe;IACf,0BAA0B;IAC1B,2BAA2B;IAC3B,4BAA4B;IAC5B,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,oBAAoB;IACpB,yBAAyB;IACzB,6BAA6B;IAC7B,kBAAkB;IAClB,0BAA0B;IAC1B,oBAAoB;CACd,CAAC;AAEE,QAAA,mBAAmB,GAAG,
|
1
|
+
{"version":3,"file":"pageId.js","sourceRoot":"","sources":["../../../src/bin/keycloakify/generateFtl/pageId.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC7B,WAAW;IACX,oBAAoB;IACpB,oBAAoB;IACpB,2BAA2B;IAC3B,cAAc;IACd,2BAA2B;IAC3B,UAAU;IACV,WAAW;IACX,0BAA0B;IAC1B,wBAAwB;IACxB,WAAW;IACX,0CAA0C;IAC1C,uBAAuB;IACvB,eAAe;IACf,0BAA0B;IAC1B,2BAA2B;IAC3B,4BAA4B;IAC5B,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,oBAAoB;IACpB,yBAAyB;IACzB,6BAA6B;IAC7B,kBAAkB;IAClB,0BAA0B;IAC1B,oBAAoB;CACd,CAAC;AAEE,QAAA,mBAAmB,GAAG;IAC/B,cAAc;IACd,aAAa;IACb,cAAc;IACd,UAAU;IACV,kBAAkB;IAClB,SAAS;IACT,uBAAuB;CACjB,CAAC"}
|
@@ -119,6 +119,7 @@ var getThemeSrcDirPath_1 = require("../getThemeSrcDirPath");
|
|
119
119
|
var getThisCodebaseRootDirPath_1 = require("../tools/getThisCodebaseRootDirPath");
|
120
120
|
var readThisNpmProjectVersion_1 = require("../tools/readThisNpmProjectVersion");
|
121
121
|
var constants_1 = require("../constants");
|
122
|
+
var assertNoPnpmDlx_1 = require("../tools/assertNoPnpmDlx");
|
122
123
|
function main() {
|
123
124
|
return __awaiter(this, void 0, void 0, function () {
|
124
125
|
var buildOptions, logger, themeSrcDirPath, _a, _b, themeName, e_1_1, pomFileCode, containerKeycloakVersion, jarFilePath, jarDirPath, retrocompatJarFilePath;
|
@@ -126,6 +127,7 @@ function main() {
|
|
126
127
|
return __generator(this, function (_e) {
|
127
128
|
switch (_e.label) {
|
128
129
|
case 0:
|
130
|
+
(0, assertNoPnpmDlx_1.assertNoPnpmDlx)();
|
129
131
|
buildOptions = (0, buildOptions_1.readBuildOptions)({
|
130
132
|
"processArgv": process.argv.slice(2)
|
131
133
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"keycloakify.js","sourceRoot":"","sources":["../../src/bin/keycloakify/keycloakify.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAgD;AAChD,6CAA4C;AAC5C,6BAAoI;AACpI,2DAA+C;AAC/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AE;wBACtH,iGAA0F,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,0EAAuE;wBAC3L,mHAAmH;wBACnH,wIAAwI;wBACxI,kLAAkL;wBAClL,0JAA0J;wBAC1J,4GAA4G;wBAC5G,mHAA4G,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE;wBACxI,iHAAiH;wBACjH,EAAE;wBACF,mIAA2G;wBAC3G,4GAAwF;wBACxF,EAAE;wBACF,8CAA8C;wBAC9C,EAAE;8BACJ,IAAI,CAAC,IAAI,CAAC,CACf,CAAC;;;;;CACL;AAxHD,oBAwHC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function assertNoPnpmDlx(): void;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assertNoPnpmDlx = void 0;
|
4
|
+
var path_1 = require("path");
|
5
|
+
function assertNoPnpmDlx() {
|
6
|
+
if (__dirname.includes("".concat(path_1.sep, "pnpm").concat(path_1.sep, "dlx").concat(path_1.sep))) {
|
7
|
+
console.log([
|
8
|
+
"Please don't use `pnpm dlx keycloakify`. Even if you're using pnpm as a package manager",
|
9
|
+
"use `npx keycloakify` or `pnpm exec keycloakify` instead since you want to use the keycloakify version that is installed in your project and",
|
10
|
+
"not the latest version on NPM."
|
11
|
+
].join(" "));
|
12
|
+
process.exit(1);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
exports.assertNoPnpmDlx = assertNoPnpmDlx;
|
16
|
+
//# sourceMappingURL=assertNoPnpmDlx.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assertNoPnpmDlx.js","sourceRoot":"","sources":["../../src/bin/tools/assertNoPnpmDlx.ts"],"names":[],"mappings":";;;AAAA,6BAAsC;AAEtC,SAAgB,eAAe;IAC3B,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAG,UAAO,iBAAO,UAAO,gBAAM,UAAO,CAAE,CAAC,EAAE;QAC7D,OAAO,CAAC,GAAG,CACP;YACI,yFAAyF;YACzF,8IAA8I;YAC9I,gCAAgC;SACnC,CAAC,IAAI,CAAC,GAAG,CAAC,CACd,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACnB;AACL,CAAC;AAXD,0CAWC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "keycloakify",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.7.1",
|
4
4
|
"description": "Create Keycloak themes using React",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -71,6 +71,7 @@
|
|
71
71
|
"src/account/lib/useGetClassName.ts",
|
72
72
|
"src/account/pages/Account.tsx",
|
73
73
|
"src/account/pages/Applications.tsx",
|
74
|
+
"src/account/pages/FederatedIdentity.tsx",
|
74
75
|
"src/account/pages/Log.tsx",
|
75
76
|
"src/account/pages/PageProps.ts",
|
76
77
|
"src/account/pages/Password.tsx",
|
@@ -116,6 +117,7 @@
|
|
116
117
|
"src/bin/tools/OptionalIfCanBeUndefined.ts",
|
117
118
|
"src/bin/tools/SemVer.ts",
|
118
119
|
"src/bin/tools/String.prototype.replaceAll.ts",
|
120
|
+
"src/bin/tools/assertNoPnpmDlx.ts",
|
119
121
|
"src/bin/tools/crawl.ts",
|
120
122
|
"src/bin/tools/crc32.ts",
|
121
123
|
"src/bin/tools/deflate.ts",
|
@@ -363,6 +365,9 @@
|
|
363
365
|
"account/pages/Applications.d.ts",
|
364
366
|
"account/pages/Applications.js",
|
365
367
|
"account/pages/Applications.js.map",
|
368
|
+
"account/pages/FederatedIdentity.d.ts",
|
369
|
+
"account/pages/FederatedIdentity.js",
|
370
|
+
"account/pages/FederatedIdentity.js.map",
|
366
371
|
"account/pages/Log.d.ts",
|
367
372
|
"account/pages/Log.js",
|
368
373
|
"account/pages/Log.js.map",
|
@@ -496,6 +501,9 @@
|
|
496
501
|
"bin/tools/String.prototype.replaceAll.d.ts",
|
497
502
|
"bin/tools/String.prototype.replaceAll.js",
|
498
503
|
"bin/tools/String.prototype.replaceAll.js.map",
|
504
|
+
"bin/tools/assertNoPnpmDlx.d.ts",
|
505
|
+
"bin/tools/assertNoPnpmDlx.js",
|
506
|
+
"bin/tools/assertNoPnpmDlx.js.map",
|
499
507
|
"bin/tools/crawl.d.ts",
|
500
508
|
"bin/tools/crawl.js",
|
501
509
|
"bin/tools/crawl.js.map",
|
@@ -830,6 +838,7 @@
|
|
830
838
|
"src/account/lib/useGetClassName.ts",
|
831
839
|
"src/account/pages/Account.tsx",
|
832
840
|
"src/account/pages/Applications.tsx",
|
841
|
+
"src/account/pages/FederatedIdentity.tsx",
|
833
842
|
"src/account/pages/Log.tsx",
|
834
843
|
"src/account/pages/PageProps.ts",
|
835
844
|
"src/account/pages/Password.tsx",
|
@@ -875,6 +884,7 @@
|
|
875
884
|
"src/bin/tools/OptionalIfCanBeUndefined.ts",
|
876
885
|
"src/bin/tools/SemVer.ts",
|
877
886
|
"src/bin/tools/String.prototype.replaceAll.ts",
|
887
|
+
"src/bin/tools/assertNoPnpmDlx.ts",
|
878
888
|
"src/bin/tools/crawl.ts",
|
879
889
|
"src/bin/tools/crc32.ts",
|
880
890
|
"src/bin/tools/deflate.ts",
|
package/src/account/Fallback.tsx
CHANGED
@@ -3,6 +3,7 @@ import type { PageProps } from "keycloakify/account/pages/PageProps";
|
|
3
3
|
import type { I18n } from "keycloakify/account/i18n";
|
4
4
|
import type { KcContext } from "./kcContext";
|
5
5
|
import { assert, type Equals } from "tsafe/assert";
|
6
|
+
import FederatedIdentity from "./pages/FederatedIdentity";
|
6
7
|
|
7
8
|
const Password = lazy(() => import("keycloakify/account/pages/Password"));
|
8
9
|
const Account = lazy(() => import("keycloakify/account/pages/Account"));
|
@@ -30,6 +31,8 @@ export default function Fallback(props: PageProps<KcContext, I18n>) {
|
|
30
31
|
return <Applications kcContext={kcContext} {...rest} />;
|
31
32
|
case "log.ftl":
|
32
33
|
return <Log kcContext={kcContext} {...rest} />;
|
34
|
+
case "federatedIdentity.ftl":
|
35
|
+
return <FederatedIdentity kcContext={kcContext} {...rest} />;
|
33
36
|
}
|
34
37
|
assert<Equals<typeof kcContext, never>>(false);
|
35
38
|
})()}
|
@@ -3,7 +3,14 @@ import { assert } from "tsafe/assert";
|
|
3
3
|
import type { Equals } from "tsafe";
|
4
4
|
import { type ThemeType } from "keycloakify/bin/constants";
|
5
5
|
|
6
|
-
export type KcContext =
|
6
|
+
export type KcContext =
|
7
|
+
| KcContext.Password
|
8
|
+
| KcContext.Account
|
9
|
+
| KcContext.Sessions
|
10
|
+
| KcContext.Totp
|
11
|
+
| KcContext.Applications
|
12
|
+
| KcContext.Log
|
13
|
+
| KcContext.FederatedIdentity;
|
7
14
|
|
8
15
|
export declare namespace KcContext {
|
9
16
|
export type Common = {
|
@@ -27,6 +34,7 @@ export declare namespace KcContext {
|
|
27
34
|
sessionsUrl: string;
|
28
35
|
applicationsUrl: string;
|
29
36
|
logUrl: string;
|
37
|
+
logoutUrl: string;
|
30
38
|
resourceUrl: string;
|
31
39
|
resourcesCommonPath: string;
|
32
40
|
resourcesPath: string;
|
@@ -91,15 +99,6 @@ export declare namespace KcContext {
|
|
91
99
|
username?: string;
|
92
100
|
};
|
93
101
|
properties: Record<string, string | undefined>;
|
94
|
-
sessions: {
|
95
|
-
sessions: {
|
96
|
-
ipAddress: string;
|
97
|
-
started?: any;
|
98
|
-
lastAccess?: any;
|
99
|
-
expires?: any;
|
100
|
-
clients: string[];
|
101
|
-
}[];
|
102
|
-
};
|
103
102
|
};
|
104
103
|
|
105
104
|
export type Password = Common & {
|
@@ -126,11 +125,12 @@ export declare namespace KcContext {
|
|
126
125
|
pageId: "sessions.ftl";
|
127
126
|
sessions: {
|
128
127
|
sessions: {
|
129
|
-
|
130
|
-
started?: any;
|
131
|
-
lastAccess?: any;
|
132
|
-
expires?: any;
|
128
|
+
expires: string;
|
133
129
|
clients: string[];
|
130
|
+
ipAddress: string;
|
131
|
+
started: string;
|
132
|
+
lastAccess: string;
|
133
|
+
id: string;
|
134
134
|
}[];
|
135
135
|
};
|
136
136
|
stateChecker: string;
|
@@ -193,12 +193,21 @@ export declare namespace KcContext {
|
|
193
193
|
stateChecker: string;
|
194
194
|
applications: {
|
195
195
|
applications: {
|
196
|
-
realmRolesAvailable: {
|
196
|
+
realmRolesAvailable: {
|
197
|
+
name: string;
|
198
|
+
description: string;
|
199
|
+
compositesStream?: Record<string, unknown>;
|
200
|
+
clientRole?: boolean;
|
201
|
+
composite?: boolean;
|
202
|
+
id?: string;
|
203
|
+
containerId?: string;
|
204
|
+
attributes?: Record<string, unknown>;
|
205
|
+
}[];
|
197
206
|
resourceRolesAvailable: Record<
|
198
207
|
string,
|
199
208
|
{
|
200
209
|
roleName: string;
|
201
|
-
roleDescription
|
210
|
+
roleDescription?: string;
|
202
211
|
clientName: string;
|
203
212
|
clientId: string;
|
204
213
|
}[]
|
@@ -207,41 +216,44 @@ export declare namespace KcContext {
|
|
207
216
|
clientScopesGranted: string[];
|
208
217
|
effectiveUrl?: string;
|
209
218
|
client: {
|
210
|
-
|
211
|
-
|
219
|
+
alwaysDisplayInConsole: boolean;
|
220
|
+
attributes: Record<string, unknown>;
|
221
|
+
authenticationFlowBindingOverrides: Record<string, unknown>;
|
222
|
+
baseUrl?: string;
|
212
223
|
bearerOnly: boolean;
|
213
|
-
id: string;
|
214
|
-
protocolMappersStream: Record<string, unknown>;
|
215
|
-
includeInTokenScope: boolean;
|
216
|
-
redirectUris: string[];
|
217
|
-
fullScopeAllowed: boolean;
|
218
|
-
registeredNodes: Record<string, unknown>;
|
219
|
-
enabled: boolean;
|
220
224
|
clientAuthenticatorType: string;
|
221
|
-
realmScopeMappingsStream: Record<string, unknown>;
|
222
|
-
scopeMappingsStream: Record<string, unknown>;
|
223
|
-
displayOnConsentScreen: boolean;
|
224
225
|
clientId: string;
|
225
|
-
rootUrl: string;
|
226
|
-
authenticationFlowBindingOverrides: Record<string, unknown>;
|
227
|
-
standardFlowEnabled: boolean;
|
228
|
-
attributes: Record<string, unknown>;
|
229
|
-
publicClient: boolean;
|
230
|
-
alwaysDisplayInConsole: boolean;
|
231
226
|
consentRequired: boolean;
|
232
|
-
|
233
|
-
|
234
|
-
protocol: string;
|
235
|
-
dynamicScope: boolean;
|
227
|
+
consentScreenText: string;
|
228
|
+
description: string;
|
236
229
|
directAccessGrantsEnabled: boolean;
|
237
|
-
|
238
|
-
|
230
|
+
displayOnConsentScreen: boolean;
|
231
|
+
dynamicScope: boolean;
|
232
|
+
enabled: boolean;
|
239
233
|
frontchannelLogout: boolean;
|
240
|
-
|
234
|
+
fullScopeAllowed: boolean;
|
235
|
+
id: string;
|
241
236
|
implicitFlowEnabled: boolean;
|
242
|
-
|
243
|
-
|
237
|
+
includeInTokenScope: boolean;
|
238
|
+
managementUrl: string;
|
239
|
+
name?: string;
|
240
|
+
nodeReRegistrationTimeout: string;
|
241
|
+
notBefore: string;
|
242
|
+
protocol: string;
|
243
|
+
protocolMappersStream: Record<string, unknown>;
|
244
|
+
publicClient: boolean;
|
244
245
|
realm: Record<string, unknown>;
|
246
|
+
realmScopeMappingsStream: Record<string, unknown>;
|
247
|
+
redirectUris: string[];
|
248
|
+
registeredNodes: Record<string, unknown>;
|
249
|
+
rolesStream: Record<string, unknown>;
|
250
|
+
rootUrl?: string;
|
251
|
+
scopeMappingsStream: Record<string, unknown>;
|
252
|
+
secret: string;
|
253
|
+
serviceAccountsEnabled: boolean;
|
254
|
+
standardFlowEnabled: boolean;
|
255
|
+
surrogateAuthRequired: boolean;
|
256
|
+
webOrigins: string[];
|
245
257
|
};
|
246
258
|
}[];
|
247
259
|
};
|
@@ -254,9 +266,23 @@ export declare namespace KcContext {
|
|
254
266
|
date: string | number | Date;
|
255
267
|
event: string;
|
256
268
|
ipAddress: string;
|
257
|
-
client:
|
258
|
-
details:
|
269
|
+
client: string;
|
270
|
+
details: { value: string; key: string }[];
|
271
|
+
}[];
|
272
|
+
};
|
273
|
+
};
|
274
|
+
|
275
|
+
export type FederatedIdentity = Common & {
|
276
|
+
pageId: "federatedIdentity.ftl";
|
277
|
+
stateChecker: string;
|
278
|
+
federatedIdentity: {
|
279
|
+
identities: {
|
280
|
+
providerId: string;
|
281
|
+
displayName: string;
|
282
|
+
userName: string;
|
283
|
+
connected: boolean;
|
259
284
|
}[];
|
285
|
+
removeLinkPossible: boolean;
|
260
286
|
};
|
261
287
|
};
|
262
288
|
}
|
@@ -17,6 +17,7 @@ export const kcContextCommonMock: KcContext.Common = {
|
|
17
17
|
"resourceUrl": "#",
|
18
18
|
"accountUrl": "#",
|
19
19
|
"applicationsUrl": "#",
|
20
|
+
"logoutUrl": "#",
|
20
21
|
"getLogoutUrl": () => "#",
|
21
22
|
"logUrl": "#",
|
22
23
|
"passwordUrl": "#",
|
@@ -156,17 +157,6 @@ export const kcContextCommonMock: KcContext.Common = {
|
|
156
157
|
"css/account.css img/icon-sidebar-active.png img/logo.png resources-common/node_modules/patternfly/dist/css/patternfly.min.css resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css resources-common/node_modules/patternfly/dist/css/patternfly-additions.min.css",
|
157
158
|
"kcButtonClass": "btn",
|
158
159
|
"kcButtonDefaultClass": "btn-default"
|
159
|
-
},
|
160
|
-
"sessions": {
|
161
|
-
"sessions": [
|
162
|
-
{
|
163
|
-
"ipAddress": "127.0.0.1",
|
164
|
-
"started": new Date().toString(),
|
165
|
-
"lastAccess": new Date().toString(),
|
166
|
-
"expires": new Date().toString(),
|
167
|
-
"clients": ["Chrome", "Firefox"]
|
168
|
-
}
|
169
|
-
]
|
170
160
|
}
|
171
161
|
};
|
172
162
|
|
@@ -200,12 +190,12 @@ export const kcContextMocks: KcContext[] = [
|
|
200
190
|
"sessions": {
|
201
191
|
"sessions": [
|
202
192
|
{
|
203
|
-
...kcContextCommonMock.sessions,
|
204
193
|
"ipAddress": "127.0.0.1",
|
205
194
|
"started": new Date().toString(),
|
206
195
|
"lastAccess": new Date().toString(),
|
207
196
|
"expires": new Date().toString(),
|
208
|
-
"clients": ["Chrome", "Firefox"]
|
197
|
+
"clients": ["Chrome", "Firefox"],
|
198
|
+
"id": "f8951177-817d-4a70-9c02-86d3c170fe51"
|
209
199
|
}
|
210
200
|
]
|
211
201
|
},
|
@@ -246,9 +236,25 @@ export const kcContextMocks: KcContext[] = [
|
|
246
236
|
"event": "login",
|
247
237
|
"ipAddress": "172.17.0.1",
|
248
238
|
"client": "security-admin-console",
|
249
|
-
"details": [
|
239
|
+
"details": [{ key: "openid-connect", value: "admin" }]
|
250
240
|
}
|
251
241
|
]
|
252
242
|
}
|
243
|
+
}),
|
244
|
+
id<KcContext.FederatedIdentity>({
|
245
|
+
...kcContextCommonMock,
|
246
|
+
"stateChecker": "",
|
247
|
+
"pageId": "federatedIdentity.ftl",
|
248
|
+
"federatedIdentity": {
|
249
|
+
"identities": [
|
250
|
+
{
|
251
|
+
"providerId": "keycloak-oidc",
|
252
|
+
"displayName": "keycloak-oidc",
|
253
|
+
"userName": "John",
|
254
|
+
"connected": true
|
255
|
+
}
|
256
|
+
],
|
257
|
+
"removeLinkPossible": true
|
258
|
+
}
|
253
259
|
})
|
254
260
|
];
|
@@ -61,10 +61,10 @@ export default function Applications(props: PageProps<Extract<KcContext, { pageI
|
|
61
61
|
|
62
62
|
<td>
|
63
63
|
{!isArrayWithEmptyObject(application.realmRolesAvailable) &&
|
64
|
-
application.realmRolesAvailable.map(role => (
|
64
|
+
application.realmRolesAvailable.map((role, index) => (
|
65
65
|
<span key={role.name}>
|
66
66
|
{role.description ? advancedMsg(role.description) : advancedMsg(role.name)}
|
67
|
-
{
|
67
|
+
{index < application.realmRolesAvailable.length - 1 && ", "}
|
68
68
|
</span>
|
69
69
|
))}
|
70
70
|
{!isArrayWithEmptyObject(application.realmRolesAvailable) && application.resourceRolesAvailable && ", "}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { PageProps } from "keycloakify/account";
|
2
|
+
import { I18n } from "keycloakify/account/i18n";
|
3
|
+
import { KcContext } from "keycloakify/account/kcContext";
|
4
|
+
|
5
|
+
export default function FederatedIdentity(props: PageProps<Extract<KcContext, { pageId: "federatedIdentity.ftl" }>, I18n>) {
|
6
|
+
const { kcContext, i18n, doUseDefaultCss, classes, Template } = props;
|
7
|
+
|
8
|
+
const { url, federatedIdentity, stateChecker } = kcContext;
|
9
|
+
const { msg } = i18n;
|
10
|
+
return (
|
11
|
+
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} active="federatedIdentity">
|
12
|
+
<div className="main-layout social">
|
13
|
+
<div className="row">
|
14
|
+
<div className="col-md-10">
|
15
|
+
<h2>{msg("federatedIdentitiesHtmlTitle")}</h2>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div id="federated-identities">
|
19
|
+
{federatedIdentity.identities.map(identity => (
|
20
|
+
<div key={identity.providerId} className="row margin-bottom">
|
21
|
+
<div className="col-sm-2 col-md-2">
|
22
|
+
<label htmlFor={identity.providerId} className="control-label">
|
23
|
+
{identity.displayName}
|
24
|
+
</label>
|
25
|
+
</div>
|
26
|
+
<div className="col-sm-5 col-md-5">
|
27
|
+
<input disabled className="form-control" value={identity.userName} />
|
28
|
+
</div>
|
29
|
+
<div className="col-sm-5 col-md-5">
|
30
|
+
{identity.connected ? (
|
31
|
+
federatedIdentity.removeLinkPossible && (
|
32
|
+
<form action={url.socialUrl} method="post" className="form-inline">
|
33
|
+
<input type="hidden" name="stateChecker" value={stateChecker} />
|
34
|
+
<input type="hidden" name="action" value="remove" />
|
35
|
+
<input type="hidden" name="providerId" value={identity.providerId} />
|
36
|
+
<button id={`remove-link-${identity.providerId}`} className="btn btn-default">
|
37
|
+
{msg("doRemove")}
|
38
|
+
</button>
|
39
|
+
</form>
|
40
|
+
)
|
41
|
+
) : (
|
42
|
+
<form action={url.socialUrl} method="post" className="form-inline">
|
43
|
+
<input type="hidden" name="stateChecker" value={stateChecker} />
|
44
|
+
<input type="hidden" name="action" value="add" />
|
45
|
+
<input type="hidden" name="providerId" value={identity.providerId} />
|
46
|
+
<button id={`add-link-${identity.providerId}`} className="btn btn-default">
|
47
|
+
{msg("doAdd")}
|
48
|
+
</button>
|
49
|
+
</form>
|
50
|
+
)}
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
))}
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</Template>
|
57
|
+
);
|
58
|
+
}
|
@@ -2,7 +2,7 @@ import type { PageProps } from "keycloakify/account/pages/PageProps";
|
|
2
2
|
import type { KcContext } from "../kcContext";
|
3
3
|
import type { I18n } from "../i18n";
|
4
4
|
import { Key } from "react";
|
5
|
-
import { useGetClassName } from "
|
5
|
+
import { useGetClassName } from "keycloakify/account/lib/useGetClassName";
|
6
6
|
|
7
7
|
export default function Log(props: PageProps<Extract<KcContext, { pageId: "log.ftl" }>, I18n>) {
|
8
8
|
const { kcContext, i18n, doUseDefaultCss, classes, Template } = props;
|
@@ -12,12 +12,9 @@ export default function Sessions(props: PageProps<Extract<KcContext, { pageId: "
|
|
12
12
|
classes
|
13
13
|
});
|
14
14
|
|
15
|
-
console.log({ kcContext });
|
16
15
|
const { url, stateChecker, sessions } = kcContext;
|
17
16
|
|
18
17
|
const { msg } = i18n;
|
19
|
-
console.log({ sdf: kcContext.locale?.supported });
|
20
|
-
console.log({ asdf: "asdf" });
|
21
18
|
return (
|
22
19
|
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} active="sessions">
|
23
20
|
<div className={getClassName("kcContentWrapperClass")}>
|
@@ -7,6 +7,7 @@ import { MessageKey } from "keycloakify/account/i18n/i18n";
|
|
7
7
|
|
8
8
|
export default function Totp(props: PageProps<Extract<KcContext, { pageId: "totp.ftl" }>, I18n>) {
|
9
9
|
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;
|
10
|
+
|
10
11
|
const { getClassName } = useGetClassName({
|
11
12
|
doUseDefaultCss,
|
12
13
|
classes
|
@@ -78,7 +79,7 @@ export default function Totp(props: PageProps<Extract<KcContext, { pageId: "totp
|
|
78
79
|
<p>{msg("totpStep1")}</p>
|
79
80
|
|
80
81
|
<ul id="kc-totp-supported-apps">
|
81
|
-
{totp.supportedApplications
|
82
|
+
{totp.supportedApplications?.map(app => (
|
82
83
|
<li key={app}>{msg(app as MessageKey)}</li>
|
83
84
|
))}
|
84
85
|
</ul>
|
@@ -99,28 +100,26 @@ export default function Totp(props: PageProps<Extract<KcContext, { pageId: "totp
|
|
99
100
|
</li>
|
100
101
|
<li>
|
101
102
|
<p>{msg("totpManualStep3")}</p>
|
102
|
-
<
|
103
|
-
<
|
104
|
-
|
105
|
-
|
103
|
+
<ul>
|
104
|
+
<li id="kc-totp-type">
|
105
|
+
{msg("totpType")}: {msg(`totp.${totp.policy.type}`)}
|
106
|
+
</li>
|
107
|
+
<li id="kc-totp-algorithm">
|
108
|
+
{msg("totpAlgorithm")}: {algToKeyUriAlg?.[totp.policy.algorithm] ?? totp.policy.algorithm}
|
109
|
+
</li>
|
110
|
+
<li id="kc-totp-digits">
|
111
|
+
{msg("totpDigits")}: {totp.policy.digits}
|
112
|
+
</li>
|
113
|
+
{totp.policy.type === "totp" ? (
|
114
|
+
<li id="kc-totp-period">
|
115
|
+
{msg("totpInterval")}: {totp.policy.period}
|
106
116
|
</li>
|
107
|
-
|
108
|
-
|
117
|
+
) : (
|
118
|
+
<li id="kc-totp-counter">
|
119
|
+
{msg("totpCounter")}: {totp.policy.initialCounter}
|
109
120
|
</li>
|
110
|
-
|
111
|
-
|
112
|
-
</li>
|
113
|
-
{totp.policy.type === "totp" ? (
|
114
|
-
<li id="kc-totp-period">
|
115
|
-
{msg("totpInterval")}: {totp.policy.period}
|
116
|
-
</li>
|
117
|
-
) : (
|
118
|
-
<li id="kc-totp-counter">
|
119
|
-
{msg("totpCounter")}: {totp.policy.initialCounter}
|
120
|
-
</li>
|
121
|
-
)}
|
122
|
-
</ul>
|
123
|
-
</p>
|
121
|
+
)}
|
122
|
+
</ul>
|
124
123
|
</li>
|
125
124
|
</>
|
126
125
|
) : (
|
@@ -27,7 +27,15 @@ export const loginThemePageIds = [
|
|
27
27
|
"saml-post-form.ftl"
|
28
28
|
] as const;
|
29
29
|
|
30
|
-
export const accountThemePageIds = [
|
30
|
+
export const accountThemePageIds = [
|
31
|
+
"password.ftl",
|
32
|
+
"account.ftl",
|
33
|
+
"sessions.ftl",
|
34
|
+
"totp.ftl",
|
35
|
+
"applications.ftl",
|
36
|
+
"log.ftl",
|
37
|
+
"federatedIdentity.ftl"
|
38
|
+
] as const;
|
31
39
|
|
32
40
|
export type LoginThemePageId = (typeof loginThemePageIds)[number];
|
33
41
|
export type AccountThemePageId = (typeof accountThemePageIds)[number];
|
@@ -10,8 +10,11 @@ import { getThemeSrcDirPath } from "../getThemeSrcDirPath";
|
|
10
10
|
import { getThisCodebaseRootDirPath } from "../tools/getThisCodebaseRootDirPath";
|
11
11
|
import { readThisNpmProjectVersion } from "../tools/readThisNpmProjectVersion";
|
12
12
|
import { keycloakifyBuildOptionsForPostPostBuildScriptEnvName } from "../constants";
|
13
|
+
import { assertNoPnpmDlx } from "../tools/assertNoPnpmDlx";
|
13
14
|
|
14
15
|
export async function main() {
|
16
|
+
assertNoPnpmDlx();
|
17
|
+
|
15
18
|
const buildOptions = readBuildOptions({
|
16
19
|
"processArgv": process.argv.slice(2)
|
17
20
|
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { sep as pathSep } from "path";
|
2
|
+
|
3
|
+
export function assertNoPnpmDlx() {
|
4
|
+
if (__dirname.includes(`${pathSep}pnpm${pathSep}dlx${pathSep}`)) {
|
5
|
+
console.log(
|
6
|
+
[
|
7
|
+
"Please don't use `pnpm dlx keycloakify`. Even if you're using pnpm as a package manager",
|
8
|
+
"use `npx keycloakify` or `pnpm exec keycloakify` instead since you want to use the keycloakify version that is installed in your project and",
|
9
|
+
"not the latest version on NPM."
|
10
|
+
].join(" ")
|
11
|
+
);
|
12
|
+
process.exit(1);
|
13
|
+
}
|
14
|
+
}
|