{"version":3,"sources":["webpack:///./src/pages/PromptMultiFactor.vue?9ec0","webpack:///./src/services/TwoFactorAuthentication/store.js","webpack:///./src/pages/PromptMultiFactor.vue?bed2","webpack:///src/pages/PromptMultiFactor.vue","webpack:///./src/pages/PromptMultiFactor.vue?8ddf","webpack:///./src/pages/PromptMultiFactor.vue"],"names":["isDebug","actions","loadTwoFactorTypes","myList","value","label","unshift","list","notifyProblem","console","error","getAuthenticatorQrCode","kms","get","qrCodeData","result","getExistingAuthenticationList","log","debug","JSON","stringify","results","checkAuthenticatorCode","code","params","checked","checkFirstUseMultiFactor","firstLoginMultifactor","saveFirstLoginMultiFactor","dispatch","firstLoginMultiFactor","done","put","undefined","addAuthentication","methodType","authenticationData","priority","post","userAdditionalAuthenticationMethodID","details","notifyError","sendCode","authenticationID","validateAuthenticationCode","message","deleteExistingAuthentication","path","delete","wasDeleted","_get","Vue","use","Vuex","twoFactorAuthentication","Store","state","mutations","getters","render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","attrs","on","$event","preventDefault","processFirstLogin","staticRenderFns","data","watch","computed","mounted","scope","methods","component"],"mappings":"kHAAA,yBAA8iB,EAAG,G,sNCU3iBA,GAAU,EAGVC,EAAU,CAERC,mBAFQ,YAEe,qLAEnBC,EAAS,CACb,CACEC,MAAO,UACPC,MAAO,8BAET,CACED,MAAO,YACPC,MAAO,wBAET,CACED,MAAO,oBACPC,MAAO,gCAIPF,GACFA,EAAOG,QAAQ,CACbF,MAAO,GACPC,MAAO,wCApBc,kBAwBlB,CACLE,KAAMJ,IAzBiB,mCA4BzBK,eAAc,yDACdC,QAAQC,MAAR,MA7ByB,iCAgCpB,CACLH,KAAM,KAjCmB,4DAqCvBI,uBAvCQ,YAuCmB,8LAEJC,OAAIC,IAAJ,0EAFI,cAEvBC,EAFuB,yBAQtB,CACLC,OAAQD,IATmB,mCAY7BN,eAAc,+DACdC,QAAQC,MAAR,MAb6B,iCAgBxB,CACLK,OAAQ,KAjBqB,4DAqB3BC,8BA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,OAAO,CAACE,YAAY,QAAQF,EAAG,QAAQ,CAACE,YAAY,+BAA+BE,MAAM,CAAC,kBAAkB,GAAG,KAAO,SAAS,MAAQ,MAAMC,GAAG,CAAC,MAAQ,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBX,EAAIY,mBAAkB,EAAM,UAAUR,EAAG,OAAO,CAACE,YAAY,QAAQF,EAAG,QAAQ,CAACE,YAAY,+BAA+BE,MAAM,CAAC,qBAAqB,GAAG,KAAO,SAAS,MAAQ,gBAAgBC,GAAG,CAAC,MAAQ,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBX,EAAIY,mBAAkB,EAAO,kBACr7BC,EAAkB,G,oFCkCtB,GACEC,KAAM,WAAR,OACA,WACA,cACA,WAGEC,MAAO,GAIPC,SAAU,OAAZ,OAAY,CAAZ,GACA,kCAGEC,QAfF,WAgBIhB,KAAKiB,MAAQ,OAAjB,OAAiB,IAGfC,QAAS,CACX,kBADA,SACA,sLAEA,6CACA,4BACA,kKACA,WAEA,KAEA,sBAEA,qEAEA,mBAEA,yEAEA,yBAEA,mEAIA,gBACA,SACA,wBAKA,gBACA,wBAIA,uBACA,2BACA,MAjCA,qGAJA,yDA2CA,qBA3CA,6DCvD2V,I,wBCQvVC,EAAY,eACd,EACArB,EACAc,GACA,EACA,KACA,WACA,MAIa,aAAAO,E","file":"js/chunk-25dedce6.ea65f3ac.js","sourcesContent":["import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PromptMultiFactor.vue?vue&type=style&index=0&id=4fb6dd17&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PromptMultiFactor.vue?vue&type=style&index=0&id=4fb6dd17&lang=scss&scoped=true&\"","/*\r\n import { twoFactorAuthentication } from '@/services/TwoFactorAuthentication/store'\r\n*/\r\n\r\nimport Vue from 'vue'\r\nimport Vuex from 'vuex'\r\nimport { notifyProblem, notifyError } from '@/services/notify'\r\nimport kms from '@/services/kms'\r\nimport _get from 'lodash/get'\r\n\r\nconst isDebug = true\r\n\r\n/* eslint-disable no-empty-pattern */\r\nconst actions = {\r\n // 2FA Type List\r\n async loadTwoFactorTypes({}) {\r\n try {\r\n const myList = [\r\n {\r\n value: 'SMSCode',\r\n label: 'Send Code via Text Message'\r\n },\r\n {\r\n value: 'EmailCode',\r\n label: 'Send Code via E-mail'\r\n },\r\n {\r\n value: 'AuthenticatorCode',\r\n label: 'Code from Authenticator App'\r\n }\r\n ]\r\n\r\n if (myList) {\r\n myList.unshift({\r\n value: '',\r\n label: '<-Select an Authentication Method->'\r\n })\r\n }\r\n\r\n return {\r\n list: myList\r\n }\r\n } catch (exception) {\r\n notifyProblem(`The two factor authentication could not be retrieved.`)\r\n console.error(exception)\r\n }\r\n\r\n return {\r\n list: []\r\n }\r\n },\r\n\r\n async getAuthenticatorQrCode({}) {\r\n try {\r\n const qrCodeData = await kms.get(\r\n `/Users/UserAdditionalAuthenticationMethod/GetNewAuthenticatorSetupData`\r\n )\r\n\r\n //if (isDebug == true) console.debug('getAuthenticatorQrCode=' + JSON.stringify(qrCodeData))\r\n\r\n return {\r\n result: qrCodeData\r\n }\r\n } catch (exception) {\r\n notifyProblem(`There was a problem retrieving the authenticator code data.`)\r\n console.error(exception)\r\n }\r\n\r\n return {\r\n result: {}\r\n }\r\n },\r\n\r\n async getExistingAuthenticationList({}) {\r\n console.log('in getExistingAuthenticationList...')\r\n try {\r\n const result = await kms.get('/Users/UserAdditionalAuthenticationMethod/List')\r\n\r\n if (isDebug == true)\r\n console.debug('getExistingAuthenticationList log=' + JSON.stringify(result))\r\n\r\n return {\r\n list: result.results\r\n }\r\n } catch (exception) {\r\n notifyProblem(`The existing multi-factor authentication list could not be retrieved.`)\r\n console.error(exception)\r\n }\r\n\r\n return {\r\n list: []\r\n }\r\n },\r\n\r\n async checkAuthenticatorCode({}, { code }) {\r\n try {\r\n const params = {\r\n code: code\r\n }\r\n const checked = await kms.get(\r\n `/Users/UserAdditionalAuthenticationMethod/CheckNewAuthenticatorCode`,\r\n { params }\r\n )\r\n\r\n if (isDebug == true) console.debug('checkAuthenticatorCode=' + JSON.stringify(checked))\r\n\r\n return {\r\n result: true\r\n }\r\n } catch (exception) {\r\n notifyProblem(`The authenticator code does not seem to be valid. Please enter a valid code.`)\r\n console.error(exception)\r\n }\r\n\r\n return {\r\n result: false\r\n }\r\n },\r\n\r\n async checkFirstUseMultiFactor({}) {\r\n try {\r\n const firstLoginMultifactor = await kms.get(`/User/GetFirstLoginForMultiFactor`)\r\n\r\n if (isDebug == true)\r\n console.debug('checkFirstUseMultiFactor=' + JSON.stringify(firstLoginMultifactor))\r\n\r\n return {\r\n result: firstLoginMultifactor\r\n }\r\n } catch (exception) {\r\n if (isDebug === true)\r\n console.debug(`There was a problem retrieving the first login multi-factor flag.`)\r\n console.error(exception)\r\n }\r\n\r\n return {\r\n result: false\r\n }\r\n },\r\n\r\n async saveFirstLoginMultiFactor({ dispatch }, { firstLoginMultiFactor, done }) {\r\n if (isDebug == true) console.debug('...in saveFirstLoginMultiFactor=' + firstLoginMultiFactor)\r\n\r\n try {\r\n const results = await kms.put(\r\n `/User/SaveFirstLoginForMultiFactor?firstLoginMultiFactor=${firstLoginMultiFactor}`\r\n )\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n done()\r\n } catch (exception) {\r\n notifyProblem(`There was a problem updating the first login multi-factor flag.`)\r\n console.error(exception)\r\n }\r\n },\r\n\r\n // Add Authentication\r\n async addAuthentication({ dispatch }, { methodType, authenticationData, priority, done }) {\r\n if (isDebug == true)\r\n console.debug(\r\n '...in addAuthentication, ' + methodType + ', ' + authenticationData + ', ' + priority\r\n )\r\n\r\n if (authenticationData) {\r\n try {\r\n const results = await kms.post(`/Users/UserAdditionalAuthenticationMethod`, {\r\n methodType,\r\n authenticationData,\r\n priority\r\n })\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n if (results.userAdditionalAuthenticationMethodID > 0) {\r\n //notifyMessage(`Successfully saved your multi-factor authentication setup.`)\r\n done({ details: results })\r\n } else {\r\n notifyError('There was a problem saving your multi-factor authentication setup.')\r\n }\r\n } catch (exception) {\r\n notifyProblem(`There was a problem saving your multi-factor authentication setup.`)\r\n console.error(exception)\r\n }\r\n }\r\n },\r\n\r\n async sendCode({ dispatch }, { authenticationID, done }) {\r\n if (isDebug == true) console.debug('...in sendCode, ' + authenticationID)\r\n\r\n if (authenticationID) {\r\n try {\r\n const results = await kms.post(\r\n `/User/SendAuthenticationCode?authenticationID=${authenticationID}`\r\n )\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n done()\r\n } catch (exception) {\r\n notifyProblem(`There was a problem sending your authentication code.`)\r\n console.error(exception)\r\n }\r\n }\r\n },\r\n\r\n async validateAuthenticationCode({ dispatch }, { authenticationID, code, done }) {\r\n if (isDebug == true)\r\n console.debug('...in validateAuthenticationCode, ' + authenticationID + ', ' + code)\r\n\r\n if (authenticationID && code) {\r\n try {\r\n const results = await kms.post(\r\n `/User/ValidateAuthenticationCode?authenticationID=${authenticationID}&code=${code}`\r\n )\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n done({ details: results })\r\n } catch (exception) {\r\n notifyProblem(\r\n `There was a problem validating your authentication code. ${exception.message}`\r\n )\r\n console.error(exception)\r\n }\r\n }\r\n },\r\n\r\n async deleteExistingAuthentication({ dispatch }, { userAdditionalAuthenticationMethodID, done }) {\r\n try {\r\n const path = `/Users/UserAdditionalAuthenticationMethod/${userAdditionalAuthenticationMethodID}?forceDelete=false`\r\n\r\n const results = await kms.delete(path)\r\n\r\n if (this.isDebug == true) console.debug('results=' + JSON.stringify(results))\r\n\r\n if (dispatch && dispatch != undefined) console.debug(dispatch)\r\n\r\n const wasDeleted = _get(results, 'deleted', false)\r\n\r\n if (wasDeleted === true) {\r\n if (this.isDebug === true)\r\n console.debug(`Successfully removed your existing multi-factor authentication setup.`)\r\n done()\r\n } else {\r\n notifyError('There was a problem removing your existing multi-factor authentication setup.')\r\n }\r\n } catch (exception) {\r\n notifyProblem(`There was a problem removing your multi-factor authentication setup.`)\r\n console.error(exception)\r\n }\r\n }\r\n}\r\n/* eslint-enable no-empty-pattern */\r\n\r\nVue.use(Vuex)\r\nexport const twoFactorAuthentication = new Vuex.Store({\r\n state: {},\r\n mutations: {},\r\n getters: {},\r\n actions\r\n})\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"prompt-multifactor\"},[_c('h5',[_vm._v(\"Would you like to setup Multi-factor authentication now?\")]),_c('div',{staticClass:\"field\"},[_c('input',{staticClass:\"button is-primary is-rounded\",attrs:{\"multi-factor-yes\":\"\",\"type\":\"button\",\"value\":\"Yes\"},on:{\"click\":function($event){$event.preventDefault();return _vm.processFirstLogin(true, 'yes')}}}),_c('span',{staticClass:\"p-2\"}),_c('input',{staticClass:\"button is-primary is-rounded\",attrs:{\"multi-factor-no\":\"\",\"type\":\"button\",\"value\":\"No\"},on:{\"click\":function($event){$event.preventDefault();return _vm.processFirstLogin(true, 'no')}}}),_c('span',{staticClass:\"p-2\"}),_c('input',{staticClass:\"button is-primary is-rounded\",attrs:{\"multi-factor-later\":\"\",\"type\":\"button\",\"value\":\"Ask Me Later\"},on:{\"click\":function($event){$event.preventDefault();return _vm.processFirstLogin(false, 'later')}}})])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PromptMultiFactor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PromptMultiFactor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PromptMultiFactor.vue?vue&type=template&id=4fb6dd17&scoped=true&\"\nimport script from \"./PromptMultiFactor.vue?vue&type=script&lang=js&\"\nexport * from \"./PromptMultiFactor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./PromptMultiFactor.vue?vue&type=style&index=0&id=4fb6dd17&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4fb6dd17\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}