PageSourceSearch

https://account.ilmattino.it/assets/Consent-CAySLeCG.js

js ilmattino.it collected 2026-09-24 08:38:43 UTC 2,760 bytes, 1 lines download raw bytes

1import{b as e,ab as s,r as o,a as n,z as t,D as c,k as a,j as i,L as l,p as r,t as d,n as u,B as p,N as m,aa as h}from"./index-r-KClxtY.js";/* empty css            */import{U as _}from"./UserBadge-BCyVH04E.js";import"./UserIcon-r45bX0qk.js";const v=()=>{const v=d.sso,{testata:j}=e(),w=s(v.titles.consent,"$1",j),[x,g]=o.useState(!0),{addNotice:f}=n(),{logout:C}=h(),[N,y]=o.useState(),[S,b]=o.useState(),O=t();o.useEffect((()=>{const e=c("consent_challenge",O.search)||null;if(!e)return console.error("Missing consent challenge, restart login flow"),window.location.replace("/sso/login");a("/api/sso/challenge/consent/".concat(e)).then((s=>{var o;const n=null==s?void 0:s.data;return!1===(null==n?void 0:n.success)?(console.log("ERR_SSO_CONFLICT",null==(o=null==n?void 0:n.status)?void 0:o.code),window.location.replace(n.redirect_uri)):!0===(null==n?void 0:n.success)&&(null==n?void 0:n.redirect_uri)?window.location.replace(n.redirect_uri):(null==n?void 0:n.data)?(y(n.data),b(e),void g(!1)):window.location.replace("/sso/login")})).catch((e=>{console.error(e),window.location.replace("/sso/login")}))}),[]);const[k,E]=o.useState([]);o.useEffect((()=>{if(N){const e=Object.keys(N.scope_accessed_informations).map((e=>({key:e,label:N.scope_accessed_informations[e]})));E(e)}}),[N]);return i.jsxs("div",{className:"Consent-wrapper route-wrapper",children:[x&&i.jsx(l,{}),N&&N.user&&i.jsxs("div",{className:"auth-wrapper",children:[i.jsx("h1",{className:"page-title centered",children:w}),N.user&&i.jsx(_,{user:N.user}),i.jsxs("div",{className:"Consent-text",children:[i.jsx("p",{children:r(v.consent_disclaimer,[N.client_name])}),i.jsx("ul",{className:"Consent-list",children:k.map((e=>i.jsx("li",{children:e.label},e.key)))}),i.jsxs("p",{children:["Prosegunedo accetti la ",i.jsx(u,{to:N.client_privacy_policy,children:"Privacy Policy"})," ed i ",i.jsx(u,{to:N.client_terms,children:"Termini di servizio"})," di ",N.client_name]})]}),i.jsxs("div",{className:"Consent-actions",children:[i.jsx(p,{className:"Consent-btn deny",onClick:()=>{g(!0),C().then((()=>{window.location.href="/"}))},label:"Annulla",color:"cta"}),i.jsx(p,{className:"Consent-btn accept",onClick:()=>(g(!0),a("/api/sso/challenge/consent/".concat(S,"?accept_consent=true")).then((e=>{var s;const o=null==e?void 0:e.data;!1===(null==o?void 0:o.success)&&(console.error("ERR_SSO_CONFLICT",null==(s=null==o?void 0:o.status)?void 0:s.code),f({title:d.notices.invalid_session,type:m.error,timeout:5e3})),o.redirect_uri?window.location.href=o.redirect_uri:f({title:d.notices.generic_error,type:m.error,timeout:5e3})})).catch((e=>{console.warn(e),f({title:d.notices.generic_error,type:m.error,timeout:5e3})})).finally((()=>{g(!1)}))),label:"Consenti",color:"cta"})]})]})]})};export{v as default};

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.