1"use strict";(globalThis["webpackChunkubi"]=globalThis["webpackChunkubi"]||[]).push([[620],{620:(e,t,a)=>{a.r(t),a.d(t,{default:()=>M});var s=a(3673);const o=(0,s._)("div",{class:"text-h5 q-mb-md q-mt-lg"},"Password",-1),l={class:"text-h5 q-mb-md q-mt-lg"},n=(0,s._)("br",null,null,-1);function r(e,t,a,r,i,d){const c=(0,s.up)("ChangePassword"),u=(0,s.up)("q-tooltip"),p=(0,s.up)("q-icon"),w=(0,s.up)("Dialog2FA");return(0,s.wg)(),(0,s.iD)("div",null,[o,(0,s.Wm)(c),(0,s._)("div",l,[(0,s.Uk)(" Two-factor authentication "),(0,s.Wm)(p,{name:"info",class:"cursor-pointer"},{default:(0,s.w5)((()=>[(0,s.Wm)(u,{style:{"text-align":"center"}},{default:(0,s.w5)((()=>[(0,s.Uk)(" Please note, that your enabled 2fa code will be used "),n,(0,s.Uk)(" in all UBIX.Network services ")])),_:1})])),_:1})]),(0,s.Wm)(w)])}const i={class:"row q-col-gutter-lg"},d={class:"col-md-4 col-12"},c={class:"row q-col-gutter-lg q-mt-sm"},u={class:"col-md-4 col-12"},p={class:"col-md-4 col-12"},w={class:"row"};function h(e,t,a,o,l,n){const r=(0,s.up)("q-input"),h=(0,s.up)("q-btn"),g=(0,s.up)("q-form");return(0,s.wg)(),(0,s.j4)(g,{class:"q-gutter-y-md",onSubmit:e.changePassword},{default:(0,s.w5)((()=>[(0,s._)("div",null,[(0,s._)("div",i,[(0,s._)("div",d,[(0,s.Wm)(r,{ref:"currentPasswordRef",modelValue:e.currentPassword,"onUpdate:modelValue":t[0]||(t[0]=t=>e.currentPassword=t),"lazy-rules":"",rules:[e=>e&&e.length>0||"Required field"],label:"Current password",borderless:"",class:"grayInput grayInputColor q-px-md inputWithRules inputSettings",type:"password","hide-bottom-space":""},null,8,["modelValue","rules"])])]),(0,s._)("div",c,[(0,s._)("div",u,[(0,s.Wm)(r,{ref:"newPasswordRef",modelValue:e.newPassword,"onUpdate:modelValue":t[1]||(t[1]=t=>e.newPassword=t),"lazy-rules":"",rules:[e=>e&&e.length>0||"Required field",e=>e&&e.length>=6||"The password field must be at least 6 characters",e=>/\d/.test(e)||"Must contain at least 1 number",e=>/[!@#$%^&*()_+\-=?]/.test(e)||"Must contain at least 1 Special Character",e=>/[A-Z]/.test(e)||"Must contain at least 1 in Capital Case",e=>/[a-z]/.test(e)||"Must contain at least 1 Letter in Small Case"],label:"New password",borderless:"",class:"grayInput grayInputColor q-px-md inputWithRules inputSettings",type:"password","hide-bottom-space":""},null,8,["modelValue","rules"])]),(0,s._)("div",p,[(0,s.Wm)(r,{ref:"confirmNewPasswordRef",modelValue:e.confirmNewPassword,"onUpdate:modelValue":t[2]||(t[2]=t=>e.confirmNewPassword=t),"reactive-rules":"",rules:[t=>t===e.newPassword||"Passwords do not match"],label:"Repeat new password",borderless:"",class:"grayInput grayInputColor q-px-md inputWithRules inputSettings",type:"password","hide-bottom-space":""},null,8,["modelValue","rules"])])])]),(0,s._)("div",w,[(0,s.Wm)(h,{type:"submit",loading:e.changePasswordLoading,label:"Change password",color:"primary",class:"roundBtn paddingBtn"},null,8,["loading"])])])),_:1},8,["onSubmit"])}var g=a(1959),m=a(993),f=a(6868),y=a.n(f);const v=(0,s.aZ)({name:"ChangePassword",setup(){const e=(0,g.iH)(""),t=(0,g.iH)(""),a=(0,g.iH)(""),s=(0,g.iH)(""),o=(0,g.iH)(""),l=(0,g.iH)(""),n=(0,g.iH)(!1);return{currentPassword:e,newPassword:t,confirmNewPassword:a,currentPasswordRef:s,newPasswordRef:o,confirmNewPasswordRef:l,changePasswordLoading:n}},methods:{changePassword(){this.changePasswordLoading=!0,m.T.changePassword({currentPassword:this.currentPassword,newPassword:this.newPassword,confirmNewPassword:this.confirmNewPassword}).then((e=>{this.$q.notify({color:"blue",message:"Password changed successfully",position:"top-right"}),this.currentPassword="",this.newPassword="",this.confirmNewPassword="",this.confirmNewPasswordRef.resetValidation(),this.currentPasswordRef.resetValidation(),this.newPasswordRef.resetValidation(),this.changePasswordLoading=!1})).catch((e=>{y()(this.$q,"negative","Error",e),this.changePasswordLoading=!1}))}}});var b=a(4260),C=a(8689),P=a(4689),q=a(2165),_=a(7518),W=a.n(_);const k=(0,b.Z)(v,[["render",h]]),R=k;W()(v,"components",{QForm:C.Z,QInput:P.Z,QBtn:q.Z});var V=a(2323),S=a(8880);const U=(0,s._)("div",{class:"text-h6"}," To use an authenticator app go through the following steps: ",-1),F={style:{"font-weight":"700"}},D=(0,s._)("div",{class:"text-h5 q-mb-lg",style:{"font-weight":"500"}}," Change authenticator app credentials: ",-1),A=(0,s._)("div",{class:"text-center text-h6"},"RECOVERY CODES",-1),Z=(0,s._)("div",{class:"special-text text-center q-pa-md"}," If you lose access to your two-factor authentication credentials, you can use your recovery codes to regain access to your account. ",-1),E={class:"row justify-around"};function x(e,t,a,o,l,n){const r=(0,s.up)("q-btn"),i=(0,s.up)("q-card-section"),d=(0,s.up)("QrcodeVue"),c=(0,s.up)("q-input"),u=(0,s.up)("q-card-actions"),p=(0,s.up)("q-card"),w=(0,s.up)("q-dialog");return(0,s.wg)(),(0,s.iD)(s.HY,null,[(0,s._)("div",null,[(0,s.Wm)(r,{unelevated:"",size:"md",color:"primary",class:"roundBtn paddingBtn",onClick:e.openDialog},{default:(0,s.w5)((()=>[(0,s.Uk)((0,V.zw)(e.user.is2FaEnabled?"Change":"Enable")+" 2-FA ",1)])),_:1},8,["onClick"])]),(0,s.Wm)(w,{modelValue:e.dialog,"onUpdate:modelValue":t[4]||(t[4]=t=>e.dialog=t),class:"radius20"},{default:(0,s.w5)((()=>[e.user.is2FaEnabled?((0,s.wg)(),(0,s.j4)(p,{key:1,class:"q-pa-lg"},{default:(0,s.w5)((()=>[D,(0,s.Wm)(u,{class:"justify-between"}),(0,s.Wm)(c,{modelValue:e.code,"onUpdate:modelValue":t[2]||(t[2]=t=>e.code=t),type:"password",hint:"Write your account password please",label:"PASSWORD",borderless:"",tooltip:"Write your password.",onUpdateValue:t[3]||(t[3]=t=>e.code=t),class:"grayInput grayInputColor q-px-md inputWithRules inputSettings"},null,8,["modelValue"]),(0,s.Wm)(u,{class:"justify-between"},{default:(0,s.w5)((()=>[(0,s.Wm)(r,{color:"primary",class:"roundBtn paddingBtn",onClick:e.send},{default:(0,s.w5)((()=>[(0,s.Uk)(" Disable ")])),_:1},8,["onClick"]),(0,s.Wm)(r,{color:"primary",class:"roundBtn paddingBtn",onClick:e.regenerate},{default:(0,s.w5)((()=>[(0,s.Uk)(" Regenerate recovery codes ")])),_:1},8,["onClick"])])),_:1})])),_:1})):((0,s.wg)(),(0,s.j4)(p,{key:0,class:"q-pa-lg radius20"},{default:(0,s.w5)((()=>[U,(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s.Uk)(" 1. Download a two-factor authenticator app like Microsoft Authenticator for Android and iOS or Google Authenticator for Android and iOS ")])),_:1}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s.Uk)(" 2. Scan the QR Code or enter this key "),(0,s._)("span",F,(0,V.zw)(e.data.formattedAuthenticatorKey),1),(0,s.Uk)(" into your two factor authenticator app. Spaces and casing do not matter. ")])),_:1}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s.Wm)(d,{value:e.data.qrCode,size:150},null,8,["value"])])),_:1}),(0,s.Wm)(i,null,{default:(0,s.w5)((()=>[(0,s.Uk)(" 3. Once you have scanned the QR code or input the key above, your two factor authentication app will provide you with a unique code. Enter the code in the confirmation box below. ")])),_:1}),(0,s.Wm)(u,{class:"justify-between"},{default:(0,s.w5)((()=>[(0,s.Wm)(c,{modelValue:e.code,"onUpdate:modelValue":t[0]||(t[0]=t=>e.code=t),label:"CODE",borderless:"",hint:"Write authenticated code",onUpdateValue:t[1]||(t[1]=t=>e.code=t),onKeyup:(0,S.D2)(e.send,["enter"]),class:"grayInput grayInputColor q-px-md inputWithRules inputSettings"},null,8,["modelValue","onKeyup"]),(0,s.Wm)(r,{unelevated:"",color:"primary",class:"roundBtn paddingBtn",style:{"min-width":"150px"},onClick:e.send},{default:(0,s.w5)((()=>[(0,s.Uk)(" Send code ")])),_:1},8,["onClick"])])),_:1})])),_:1}))])),_:1},8,["modelValue"]),(0,s.Wm)(w,{modelValue:e.dialogRecovery,"onUpdate:modelValue":t[7]||(t[7]=t=>e.dialogRecovery=t)},{default:(0,s.w5)((()=>[(0,s.Wm)(p,{class:"q-pa-lg"},{default:(0,s.w5)((()=>[A,Z,(0,s._)("div",E,[(0,s._)("div",null,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(e.recoveryCodes.slice(0,5),(e=>((0,s.wg)(),(0,s.iD)("div",{key:e,style:{"font-weight":"700"}},(0,V.zw)(e),1)))),128))]),(0,s._)("div",null,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(e.recoveryCodes.slice(5),(e=>((0,s.wg)(),(0,s.iD)("div",{key:e,style:{"font-weight":"700"}},(0,V.zw)(e),1)))),128))])]),(0,s.Wm)(u,{class:"justify-between"},{default:(0,s.w5)((()=>[(0,s.Wm)(r,{color:"primary",class:"roundBtn paddingBtn",onClick:t[5]||(t[5]=t=>e.copyValue(e.recoveryCodes))},{default:(0,s.w5)((()=>[(0,s.Uk)(" COPY ")])),_:1}),(0,s.Wm)(r,{class:"roundBtn paddingBtn lightgrey",outline:"",onClick:t[6]||(t[6]=t=>e.dialogRecovery=!1)},{default:(0,s.w5)((()=>[(0,s.Uk)(" CLOSE ")])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue"])],64)}var B=a(5788);const Q=(0,s.aZ)({name:"Dialog2FA",components:{QrcodeVue:B.Z},props:{},data(){return{recoveryCodes:[],dialogRecovery:!1,data:null,dialog:!1,code:""}},computed:{user(){return this.$store.getters.userData}},methods:{send(){this.user.is2FaEnabled?m.T.disableTwoFa(this.code).then((e=>{this.recoveryCodes=[],y()(this.$q,"positive","Success","Disable 2-FA successfully."),this.dialog=!1,this.$store.commit("fillUserData",{...this.user,is2FaEnabled:!this.user.is2FaEnabled})}
1)).catch((e=>{console.error(e),y()(this.$q,"negative","Disable 2-FA fall",e)})).finally((()=>{this.code=""})):m.T.enableTwoFa({code:this.code}).then((e=>{y()(this.$q,"positive","Success","Enable 2-FA successfully."),this.dialog=!1,this.dialogRecovery=!0,this.recoveryCodes=e.recoveryCodes,this.$store.commit("fillUserData",{...this.user,is2FaEnabled:!this.user.is2FaEnabled})})).catch((e=>{console.error(e),y()(this.$q,"negative","Enable 2-FA fall",e)})).finally((()=>{this.code=""}))},regenerate(){m.T.regenerateCodesTwoFa(this.code).then((e=>{y()(this.$q,"positive","Success","Regenerate codes 2-FA successfully."),this.dialog=!1,this.dialogRecovery=!0,this.recoveryCodes=e})).catch((e=>{console.error(e),y()(this.$q,"negative","Regenerate codes 2-FA fall",e)})).finally((()=>{this.code=""}))},openDialog(){this.user.is2FaEnabled?this.dialog=!0:m.T.getTwoFaKeyAndQrCode().then((e=>{this.data=e,this.dialog=!0})).catch((e=>{y()(this.$q,"negative","Fetch data fall",e)}))},copyValue(e){e&&(navigator.clipboard.writeText(e),y()(this.$q,"positive","Successfully copied"))}}});var T=a(6778),I=a(151),$=a(5589),N=a(9367);const H=(0,b.Z)(Q,[["render",x]]),z=H;W()(Q,"components",{QBtn:q.Z,QDialog:T.Z,QCard:I.Z,QCardSection:$.Z,QCardActions:N.Z,QInput:P.Z});const O=(0,s.aZ)({name:"SettingsSecurity",components:{Dialog2FA:z,ChangePassword:R},setup(){return{}},computed:{},created(){}});var j=a(4554),L=a(5363);const K=(0,b.Z)(O,[["render",r]]),M=K;W()(O,"components",{QIcon:j.Z,QTooltip:L.Z})}}]);
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.