keycloak_theme/7890.eb84f092.iframe.bundle.js
github-actions-bot f66c3095f2 Updates
2024-09-30 09:54:17 +00:00

1 line
4.4 KiB
JavaScript

"use strict";(self.webpackChunkkeycloakify=self.webpackChunkkeycloakify||[]).push([[7890],{"./dist/login/pages/SamlPostForm.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>SamlPostForm});__webpack_require__("./node_modules/core-js/modules/es.object.assign.js"),__webpack_require__("./node_modules/core-js/modules/es.array.is-array.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/react/index.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function SamlPostForm(props){var kcContext=props.kcContext,i18n=props.i18n,doUseDefaultCss=props.doUseDefaultCss,Template=props.Template,classes=props.classes,msgStr=i18n.msgStr,msg=i18n.msg,samlPost=kcContext.samlPost,_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_13__.useState)(null),2),htmlFormElement=_useState2[0],setHtmlFormElement=_useState2[1];return(0,react__WEBPACK_IMPORTED_MODULE_13__.useEffect)((function(){null!==htmlFormElement&&("#"!==samlPost.url?htmlFormElement.submit():alert("In a real Keycloak the user would be redirected immediately"))}),[htmlFormElement]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(Template,Object.assign({kcContext,i18n,doUseDefaultCss,classes,headerNode:msg("saml.post-form.title")},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("p",{children:msg("saml.post-form.message")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("form",Object.assign({name:"saml-post-binding",method:"post",action:samlPost.url,ref:setHtmlFormElement},{children:[samlPost.SAMLRequest&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("input",{type:"hidden",name:"SAMLRequest",value:samlPost.SAMLRequest}),samlPost.SAMLResponse&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("input",{type:"hidden",name:"SAMLResponse",value:samlPost.SAMLResponse}),samlPost.relayState&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("input",{type:"hidden",name:"RelayState",value:samlPost.relayState}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("noscript",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("p",{children:msg("saml.post-form.js-disabled")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("input",{type:"submit",value:msgStr("doContinue")})]})]}))]}))}}}]);