keycloakify 7.11.7 → 7.11.9
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 +2 -1
- package/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +11 -0
- package/login/kcContext/KcContext.d.ts +1 -1
- package/login/pages/SamlPostForm.js +5 -1
- package/login/pages/SamlPostForm.js.map +1 -1
- package/package.json +1 -1
- package/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +11 -0
- package/src/login/kcContext/KcContext.ts +1 -1
- package/src/login/pages/SamlPostForm.tsx +5 -3
package/README.md
CHANGED
@@ -47,7 +47,7 @@
|
|
47
47
|
|
48
48
|
## Sponsor 👼
|
49
49
|
|
50
|
-
We are exclusively sponsored by [Cloud IAM](https://
|
50
|
+
We are exclusively sponsored by [Cloud IAM](https://cloud-iam.com/?mtm_campaign=keycloakify-deal&mtm_source=keycloakify-github), a French company offering Keycloak as a service.
|
51
51
|
Their dedicated support helps us continue the development and maintenance of this project.
|
52
52
|
|
53
53
|
[Cloud IAM](https://cloud-iam.com/?mtm_campaign=keycloakify-deal&mtm_source=keycloakify-github) provides the following services:
|
@@ -104,6 +104,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
104
104
|
</tr>
|
105
105
|
<tr>
|
106
106
|
<td align="center" valign="top" width="14.28%"><a href="https://www.gravitysoftware.be"><img src="https://avatars.githubusercontent.com/u/1140574?v=4?s=100" width="100px;" alt="Thomas Silvestre"/><br /><sub><b>Thomas Silvestre</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=thosil" title="Code">💻</a></td>
|
107
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/satanshiro"><img src="https://avatars.githubusercontent.com/u/38865738?v=4?s=100" width="100px;" alt="satanshiro"/><br /><sub><b>satanshiro</b></sub></a><br /><a href="https://github.com/keycloakify/keycloakify/commits?author=satanshiro" title="Code">💻</a></td>
|
107
108
|
</tr>
|
108
109
|
</tbody>
|
109
110
|
</table>
|
@@ -337,6 +337,17 @@
|
|
337
337
|
|
338
338
|
</#if>
|
339
339
|
|
340
|
+
<#local isDate = "">
|
341
|
+
<#attempt>
|
342
|
+
<#local isDate = object?is_date_like>
|
343
|
+
<#recover>
|
344
|
+
<#return "ABORT: Can't test if it's a date">
|
345
|
+
</#attempt>
|
346
|
+
|
347
|
+
<#if isDate>
|
348
|
+
<#return '"' + object?datetime?iso_utc + '"'>
|
349
|
+
</#if>
|
350
|
+
|
340
351
|
<#attempt>
|
341
352
|
<#return '"' + object?js_string + '"'>;
|
342
353
|
<#recover>
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useEffect } from "react";
|
2
3
|
export default function SamlPostForm(props) {
|
3
4
|
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;
|
4
5
|
const { msgStr, msg } = i18n;
|
5
6
|
const { samlPost } = kcContext;
|
6
|
-
|
7
|
+
useEffect(() => {
|
8
|
+
document.forms[0].submit();
|
9
|
+
}, [samlPost]);
|
10
|
+
return (_jsxs(Template, Object.assign({}, { kcContext, i18n, doUseDefaultCss, classes }, { displayMessage: false, headerNode: msg("saml.post-form.title") }, { children: [_jsx("p", { children: msg("saml.post-form.message") }), _jsxs("form", Object.assign({ name: "saml-post-binding", method: "post", action: samlPost.url }, { children: [samlPost.SAMLRequest && _jsx("input", { type: "hidden", name: "SAMLRequest", value: samlPost.SAMLRequest }), samlPost.SAMLResponse && _jsx("input", { type: "hidden", name: "SAMLResponse", value: samlPost.SAMLResponse }), samlPost.relayState && _jsx("input", { type: "hidden", name: "RelayState", value: samlPost.relayState }), _jsxs("noscript", { children: [_jsx("p", { children: msg("saml.post-form.js-disabled") }), _jsx("input", { type: "submit", value: msgStr("doContinue") })] })] }))] })));
|
7
11
|
}
|
8
12
|
//# sourceMappingURL=SamlPostForm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SamlPostForm.js","sourceRoot":"","sources":["../../src/login/pages/SamlPostForm.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"SamlPostForm.js","sourceRoot":"","sources":["../../src/login/pages/SamlPostForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAA4E;IAC7G,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAE7B,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,GAAG,EAAE;QACX,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,CACH,MAAC,QAAQ,oBAAK,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,CAAC,sBAAsB,CAAC,iBACvH,sBAAI,GAAG,CAAC,wBAAwB,CAAC,GAAK,EACtC,8BAAM,IAAI,EAAC,mBAAmB,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,iBAC5D,QAAQ,CAAC,WAAW,IAAI,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,GAAI,EAC/F,QAAQ,CAAC,YAAY,IAAI,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAE,QAAQ,CAAC,YAAY,GAAI,EAClG,QAAQ,CAAC,UAAU,IAAI,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,GAAI,EAC7F,+BACI,sBAAI,GAAG,CAAC,4BAA4B,CAAC,GAAK,EAC1C,gBAAO,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,GAAI,IAC7C,KACR,KACA,CACd,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
@@ -337,6 +337,17 @@
|
|
337
337
|
|
338
338
|
</#if>
|
339
339
|
|
340
|
+
<#local isDate = "">
|
341
|
+
<#attempt>
|
342
|
+
<#local isDate = object?is_date_like>
|
343
|
+
<#recover>
|
344
|
+
<#return "ABORT: Can't test if it's a date">
|
345
|
+
</#attempt>
|
346
|
+
|
347
|
+
<#if isDate>
|
348
|
+
<#return '"' + object?datetime?iso_utc + '"'>
|
349
|
+
</#if>
|
350
|
+
|
340
351
|
<#attempt>
|
341
352
|
<#return '"' + object?js_string + '"'>;
|
342
353
|
<#recover>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { useEffect } from "react";
|
1
2
|
import type { PageProps } from "keycloakify/login/pages/PageProps";
|
2
3
|
import type { KcContext } from "../kcContext";
|
3
4
|
import type { I18n } from "../i18n";
|
@@ -8,15 +9,16 @@ export default function SamlPostForm(props: PageProps<Extract<KcContext, { pageI
|
|
8
9
|
const { msgStr, msg } = i18n;
|
9
10
|
|
10
11
|
const { samlPost } = kcContext;
|
11
|
-
|
12
|
+
useEffect(() => {
|
13
|
+
document.forms[0].submit();
|
14
|
+
}, [samlPost]);
|
12
15
|
return (
|
13
16
|
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} displayMessage={false} headerNode={msg("saml.post-form.title")}>
|
14
|
-
<script dangerouslySetInnerHTML={{ "__html": `window.onload = function() {document.forms[0].submit()};` }} />
|
15
17
|
<p>{msg("saml.post-form.message")}</p>
|
16
18
|
<form name="saml-post-binding" method="post" action={samlPost.url}>
|
17
19
|
{samlPost.SAMLRequest && <input type="hidden" name="SAMLRequest" value={samlPost.SAMLRequest} />}
|
18
20
|
{samlPost.SAMLResponse && <input type="hidden" name="SAMLResponse" value={samlPost.SAMLResponse} />}
|
19
|
-
{samlPost.
|
21
|
+
{samlPost.relayState && <input type="hidden" name="RelayState" value={samlPost.relayState} />}
|
20
22
|
<noscript>
|
21
23
|
<p>{msg("saml.post-form.js-disabled")}</p>
|
22
24
|
<input type="submit" value={msgStr("doContinue")} />
|