1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7436],{37555:function(e,o,n){"use strict";n.d(o,{Z:function(){return r}});var r=(0,n(30853).Z)("trash-x","IconTrashX",[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]])},51860:function(e,o,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/setup_saml/[code]/test_mode",function(){return n(88268)}])},20076:function(e,o,n){"use strict";n.r(o),n.d(o,{__N_SSP:function(){return I},default:function(){return saml_in_test_mode}});var r=n(85893),t=n(64761),s=n(66137),i=n(97564),c=n(19236),a=n(95117),l=n(67841),u=n(20966),d=n(88393),g=n(33575),_=n(37555),h=n(88198),p=n(11163),f=n(67294),m=n(71815),x=n(61464),v=n(1448);let apiSamlGoLive=(e,o)=>{let n=e.connectionId?{connection_id:e.connectionId}:{};return(0,v.j0)("/api/fe/v3/saml_idp_metadata/go_live/".concat(e.org_id),n,o).then(async e=>{if(e.ok)return{success:!0};let o=await (0,x.p0)(e);return o?{success:!1,error_type:o.error_code,user_facing_error:o.user_facing_error}:404===e.status?{success:!1,error_type:x.$C.OrgNotFound,user_facing_error:"Organization not found"}:(0,v.xo)()})};var j=n(40423),S=n(35886),y=n(11614),w=n(5291),N=n(34438),k=n(54070),C=n(6206),I=!0,saml_in_test_mode=e=>{var o;let{pageConfig:n,selectedOrgConnection:x}=e,{classes:v}=(0,C.useSamlFormStyles)(),I=(0,p.useRouter)(),b=(0,t.rZ)(),[T,E]=(0,f.useState)(!1),[O,z]=(0,f.useState)(!1),B=(0,N.A)(),Z=!!B||!n.org.can_have_multi_idp,[L,M]=(0,f.useState)(!1),F=L||null===(o=n.org.sso_test_completed)||void 0===o||o;return(0,r.jsxs)(S.T,{pageConfig:n,pageTitle:"Enterprise SSO connection in test mode",showNavbar:!1,children:[(0,r.jsx)(s.Z,{position:"left",mb:"xl",children:(0,r.jsxs)(i.K,{spacing:0,children:[(0,r.jsx)(c.D,{className:v.pageHeader,order:2,children:"Enterprise SSO setup"}),(0,r.jsxs)(s.Z,{spacing:4,noWrap:!0,children:[(0,r.jsx)(a.x,{children:x.orgName}),(0,r.jsx)(y.M,{orgId:x.orgId,connectionTarget:x.connectionTarget,canHaveMultiIdp:n.org.can_have_multi_idp,displayName:n.org.sso_display_name})]})]})}),(0,r.jsxs)(i.K,{spacing:"lg",children:[(0,r.jsx)(c.D,{className:v.sectionHeader,order:1,children:"You're almost done"}),(0,r.jsxs)(a.x,{children:["Your Enterprise SSO connection is currently in ",(0,r.jsx)(a.x,{fw:700,span:!0,children:"test mode"}),"."]}),(0,r.jsxs)(a.x,{children:["Click âTest connectionâ to be taken to a login screen. Once you log in, a preview of your user attributes will be shown. If everything looks correct, click âFinish & go live.â",Z&&" Otherwise, click âRemove connectionâ and start over."]}),!F&&(0,r.jsx)(a.x,{children:"You must successfully test your connection before going live. If youâve already done so, refresh the page to enable the âFinish & go liveâ button."}),(0,r.jsxs)(s.Z,{position:"apart",mt:"lg",children:[(0,r.jsxs)(s.Z,{position:"left",children:[(0,r.jsx)(l.z,{variant:k.Bq.Outline,onClick:()=>{M(!0),window.open((0,w.Jr)(n,x),"_blank")},children:"Test connection"}),Z&&(0,r.jsx)(l.z,{variant:k.Bq.Danger,leftIcon:(0,r.jsx)(_.Z,{size:b.other.iconSizes.lg}),onClick:()=>{z(!0),(0,m.n)({org_id:x.orgId,connectionId:(0,j.LL)(x.connectionTarget),samlCode:B}).then(e=>{if(e.success){let e=B?"/setup_saml/".concat(B):"/org/settings/".concat(x.orgId);I.push(e),g.N9.show({title:"Success",message:"Enterprise SSO connection removed",color:"successButton.6"})}else"user_facing_error"in e?g.N9.show({title:"Error",message:e.user_facing_error,color:"errorButtonColor.6"}):g.N9.show({title:"Error",message:"Unexpected error",color:"errorButtonColor.6"})}).finally(()=>z(!1))},children:O?(0,r.jsx)(u.a,{color:"errorButtonColor.6",size:"sm"}):"Remove connection"})]}),(0,r.jsx)(d.u,{label:"You must test your connection before going live",disabled:F,children:(0,r.jsx)("span",{children:(0,r.jsx)(l.z,{leftIcon:(0,r.jsx)(h.Z,{size:b.other.iconSizes.lg}),onClick:()=>{E(!0),apiSamlGoLive({org_id:x.orgId,connectionId:(0,j.LL)(x.connectionTarget)},B).then(e=>{if(e.success){let e=B?"/setup_saml/".concat(B,"/saml_finished"):(0,j.Gc)("/saml_finished?id=".concat(x.orgId),x.connectionTarget);I.push(e)}else"user_facing_error"in e?g.N9.show({title:"Error",message:e.user_facing_error,color:"errorButtonColor.6"}):g.N9.show({title:"Error",message:"Unexpected error",color:"errorButtonColor.6"})}).finally(()=>E(!1))},disabled:!F,children:T?(0,r.jsx)(u.a,{color:"actionButtonTextColor.6",size:"sm"}):"Finish & go live"})})})]})]})]})}},88268:function(e,o,n){"use strict";n.r(o),n.d(o,{__N_SSP:function(){return i}});var r=n(85893),t=n(40423),s=n(20076),i=!0;o.default=e=>{let{pageConfig:o,nonce:n}=e,i={orgId:o.org.org_id,orgName:o.org.org_name,connectionTarget:(0,t.C0)(o.connection_id)};return(0,r.jsx)(s.default,{pageConfig:o,selectedOrgConnection:i,nonce:n})}}},function(e){e.O(0,[3972,7248,7790,5777,449,2235,5886,9017,9774,2888,179],function(){return e(e.s=51860)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.