PageSourceSearch

https://e-fhn.gov.az/assets/LoginSuccessNew-ed33202a.js

js e-fhn.gov.az collected 2026-10-07 02:49:09 UTC 3,404 bytes, 1 lines download raw bytes

1import{c as f,d as p,a as k}from"./auth-900222e6.js";import{_ as m,a7 as y,ay as _,m as l,t as h,s as c,O as T,n as d,U as w,w as v,T as g,S as x,by as b}from"./index-5a8a8d70.js";import{V as S}from"./VCard-e2636b7b.js";import"./VAvatar-78b8cd72.js";import"./transition-69e051a6.js";const C="/assets/error-81274a7a.svg",N={setup(){return{authStore:y()}},data(){return{loading:{page:!1,selectedCertificate:!1},certificates:[],selectedCertificate:null,failReason:null,countdown:0,accessTokenPortal:0}},methods:{async getToken(){var e,t;try{const s=await f({code:this.$route.query.code,grant_type:"authorization_code",redirect_uri:"https://e-fhn.gov.az/login-success"});console.log({asanToken:s}),this.accessTokenPortal=s,console.log({accessToken:this.accessTokenPortal,asanToken:s})}catch(s){this.failReason=(t=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:t.error,this.countdown=3;const i=setInterval(()=>{this.countdown>1?this.countdown-=1:(clearInterval(i),this.$router.push({name:"Login"}))},1e3)}},async getTokens(){var t,s,i,n,a;await this.getToken();const e=(t=this.accessTokenPortal)==null?void 0:t.access_token;if(!(this.failReason||!e))try{const o=await p(e),{certificates:r}=o;if(r!=null&&r.length&&r[0].structureData){this.certificates=r,this.authStore.setUserCertificates(r);const u=r[0];await this.setTokens(u)}else await this.setTokens()}catch(o){const r=this.$t(`login.errors.${(i=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:i.code}`)||((a=(n=o==null?void 0:o.response)==null?void 0:n.data)==null?void 0:a.message);this.failReason=r,this.countdown=3;const u=setInterval(()=>{this.countdown>1?this.countdown-=1:(clearInterval(u),this.$router.push({name:"Login"}))},1e3)}},async setTokens(e){try{this.loading.page=!0;const{firstName:t,lastName:s,middleName:i,selectedCertificate:n,jwtToken:a}=await k({idToken:this.accessTokenPortal.id_token,selectedCertificate:e==null?void 0:e.structureData});this.authStore.setAccessToken(a==null?void 0:a.accessToken),this.authStore.setRefreshToken(a==null?void 0:a.refreshToken),this.authStore.setLoggedInUser({firstName:t,lastName:s,middleName:i,selectedCertificate:n,serialNumber:e==null?void 0:e.serialNumber}),this.$router.push({name:"Home"})}finally{this.loading.page=!1}}},async mounted(){try{this.loading.page=!0,this.$route.query.code?await this.getTokens():this.$router.push({name:"Login"})}finally{this.loading.page=!1}}},$={style:{"background-color":"#d4d6d9",position:"relative",height:"100vh"}},R={style:{position:"absolute",inset:"0"},class:"container ga-5 d-flex flex-column align-center justify-center"},P={key:1},V={class:"mb-6 text-red text-h5"},z={class:"opacity-80 text-subtitle-5"};function A(e,t,s,i,n,a){const o=_("progress-circular");return l(),h("div",$,[c("div",R,[n.failReason?w("",!0):T((l(),d(b,{key:0,size:50,color:"ghost",indeterminate:""},null,512)),[[o]]),n.failReason?(l(),d(S,{key:2,class:"text-center pa-4 rounded-lg"},{default:v(()=>[t[1]||(t[1]=c("img",{src:C,alt:"error",class:"mb-6"},null,-1)),t[2]||(t[2]=c("h3",{class:"text-h4 font-weight-bold mb-6"},"Sorğu uğursuz alındı...",-1)),c("p",V,"Səbəb: "+g(n.failReason),1),c("p",z,[c("strong",null,g(n.countdown)+" saniyə",1),t[0]||(t[0]=x(" sonra ana səhifəyə yönləndiriləcəksiniz... "))])]),_:1})):(l(),h("p",P,"Məlumatların doğruluğu yoxlanılır..."))])])}const q=m(N,[["render",A]]);export{q 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.