{"version":3,"sources":["webpack:///./src/components/authorizations/_ROPCForm.vue?75f5","webpack:///./src/services/authorizations/authorizationService.ts","webpack:///./src/components/authorizations/authorizationValidators.ts","webpack:///./src/components/authorizations/_ROPCForm.vue?488d","webpack:///./src/components/authorizations/_ROPCForm.vue","webpack:///./src/components/authorizations/_ROPCForm.vue?fe79","webpack:///./src/components/authorizations/_ROPCForm.vue?9451","webpack:///./src/directives/validate.ts","webpack:///./src/services/authorizations/types.ts","webpack:///./src/components/common/modals/UnsavedFormModal.vue?2f75","webpack:///./src/components/common/modals/UnsavedFormModal.vue","webpack:///./src/components/common/modals/UnsavedFormModal.vue?d3fc","webpack:///./src/components/common/modals/UnsavedFormModal.vue?8c30","webpack:///./src/components/layouts/HeaderActionButtons.vue?3b8a","webpack:///./src/components/layouts/HeaderActionButtons.vue?2810","webpack:///./src/components/layouts/HeaderActionButtons.vue","webpack:///./src/components/layouts/HeaderActionButtons.vue?0d84","webpack:///./src/components/layouts/HeaderActionButtons.vue?1c9a"],"names":["getAllAuthorizations","a","Promise","resolve","reject","get","then","response","data","error","getAuthorization","id","getAuthorizationInfo","getRedirectUri","createAuthorization","authorization","post","updateAuthorization","put","deleteAuthorization","delete","getOAuthJwtToken","authorizationValidators","credentialsName","rules","type","Required","Min","value","clientId","clientSecret","scopes","tenantId","username","password","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","i18n","t","validators","model","callback","$$v","$set","expression","preventBack","preventSave","on","back","save","$event","stopPropagation","preventDefault","_v","_s","$t","flowTypesEnum","flowType","toLowerCase","redirectUri","directives","name","rawName","state","formatDate","lastAuthorizationSuccessDate","_e","lastAuthorizationRequestDate","authorized","lastErrorMessage","initiateAuthorization","externalAuthorizationLink","copyExternalAuthorizeLink","ref","onContinue","staticRenderFns","ResourceOwnerPasswordCredentialsFlow","url","priorAuthorizationState","JSON","parse","stringify","nextRoute","routeParams","saveClicked","continue","fetchingActive","fetchData","window","addEventListener","event","storageArea","localStorage","key","newValue","setItem","authorizationId","$router","push","params","external","token","authorizationLink","encodeURI","authPopupWindow","navigator","clipboard","writeText","title","w","h","dualScreenLeft","undefined","screenLeft","screenX","dualScreenTop","screenTop","screenY","width","innerWidth","document","documentElement","clientWidth","screen","height","innerHeight","clientHeight","systemZoom","availWidth","left","top","newWindow","open","focus","date","utc","local","format","to","next","noChanges","lodash","isEqual","$refs","UnsavedFormModal","beforeRouteLeave","from","onBeforeRouteLeave","components","HeaderActionButtons","validate","component","bind","element","binding","vNode","componentContext","context","el","property","set","confirm","matchRule","find","x","Confirm","confirmProperty","message","update","unbind","FlowTypesEnum","scopedSlots","_u","fn","decline","proxy","$bvModal","show","$emit","hide","class","sticky","showSaveButton","isAdmin","saveAndBack","editorStatus","namespace","permitionEnum","havePermition","$route","getCurrentUser","permissions","AdminPrivilege","checkPermition","default","abg","inserted","vnode","offset","pageYOffset","getBoundingClientRect","doc","scrollTop","clientTop","removeEventListener"],"mappings":"gHAAA,yBAA0f,EAAG,G,qpBCMtf,SAAeA,IAAtB,+B,kCAAO,sBAAAC,EAAA,gFACI,IAAIC,SAAQ,SAACC,EAASC,GACzB,OAAIC,IAAI,UAAUC,MACd,SAAAC,GACIJ,EAAQI,EAASC,SAErB,SAAAC,GACIL,EAAOK,UAPhB,2C,wBAaA,SAAeC,EAAtB,kC,kCAAO,WAAgCC,GAAhC,SAAAV,EAAA,gFACI,IAAIC,SAAQ,SAACC,EAASC,GACzB,OAAIC,IAAJ,iBAAkBM,IAAML,MACpB,SAAAC,GACIJ,EAAQI,EAASC,SAErB,SAAAC,GACIL,EAAOK,UAPhB,2C,wBAaA,SAAeG,EAAtB,kC,kCAAO,WAAoCD,GAApC,SAAAV,EAAA,gFACI,IAAIC,SAAQ,SAACC,EAASC,GACzB,OAAIC,IAAJ,sBAAuBM,IAAML,MACzB,SAAAC,GACIJ,EAAQI,EAASC,SAErB,SAAAC,GACIL,EAAOK,UAPhB,2C,wBAaA,SAAeI,IAAtB,+B,kCAAO,sBAAAZ,EAAA,gFAC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KAAK6J,cAAc7J,KAAKmK,qBAvC1F,GAAiD,QACrC,gBAAP,kB,qCACyB,gBAAzB,eAAK,CAAEC,SAAS,K,kCACS,gBAAzB,eAAK,CAAEA,SAAS,K,kCACwB,gBAAxC,eAAO,iBAAkB,CAAER,e,qCAJX,EAAmB,gBAnBvC,eAAU,CACP9H,WAAY,CACRuI,IAAK,CACDC,SAAU,SAAU3C,EAASC,EAAS2C,GAClC,IAAIC,EAAU9G,OAAO+G,YAAc9C,EAAQ+C,wBAAwBtE,IAAO,GAC1E,EAAS,WACL,IAAIuE,EAAMjF,SAASC,gBACfS,GAAO1C,OAAO+G,aAAeE,EAAIC,YAAcD,EAAIE,WAAa,GAChDN,EAAMxC,QAAgBwB,OAAtCnD,GAAOoE,GAGf9G,OAAOC,iBAAiB,SAAU,GAAQ,IAE9CgF,OAAQ,SAAUhB,EAASC,EAAS2C,GAChC7G,OAAOoH,oBAAoB,SAAU,GAAQ,SAKxC,WCvD2Y,I,wBCQ5ZrD,EAAY,eACd,EACA3H,EACA+C,GACA,EACA,KACA,WACA,MAIa,OAAA4E,E","file":"js/chunk-55033e78.26e496d2.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_ROPCForm.vue?vue&type=style&index=0&id=389b1cea&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_ROPCForm.vue?vue&type=style&index=0&id=389b1cea&scoped=true&lang=css&\"","import api from \"@/services/api\";\r\nimport {\r\n Authorization,\r\n AuthorizationInfo\r\n} from \"@/services/authorizations/types\";\r\n\r\nexport async function getAllAuthorizations(): Promise> {\r\n return new Promise((resolve, reject) => {\r\n api.get(\"/OAuth\").then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getAuthorization(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getAuthorizationInfo(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/info/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getRedirectUri(): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/RedirectUri`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function createAuthorization(authorization: Authorization) : Promise {\r\n return new Promise((resolve, reject) => {\r\n api.post(`/OAuth`, authorization).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function updateAuthorization(authorization: Authorization) : Promise {\r\n return new Promise((resolve, reject) => {\r\n api.put(`/OAuth`, authorization).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function deleteAuthorization(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.delete(`/OAuth/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getAccessToken(param: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/getAccessToken/${param}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport function authorize(id: string) : Promise {\r\n return new Promise((resolve, reject) => {\r\n api.post(`/OAuth/authorize/${id}`, {}).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport async function getOAuthJwtToken(id: string): Promise {\r\n return new Promise((resolve, reject) => {\r\n api.get(`/OAuth/getOAuthJwtToken/${id}`).then(\r\n response => {\r\n resolve(response.data);\r\n },\r\n error => {\r\n reject(error);\r\n }\r\n );\r\n });\r\n}\r\n","import { ValidationModel, ValidationType } from \"@/services/validation/types\";\r\n\r\nexport const authorizationValidators = {\r\n credentialsName: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n clientId: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n clientSecret: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n scopes: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n tenantId: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n username: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel,\r\n password: {\r\n rules: [\r\n { type: ValidationType.Required },\r\n { type: ValidationType.Min, value: 1 }\r\n ]\r\n } as ValidationModel\r\n};\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('header',{staticClass:\"page-header\"},[_c('div',{staticClass:\"d-flex justify-content-between\"},[_c('vsc-name-input',{attrs:{\"placeholder\":_vm.i18n.t('authorization.enterName'),\"validator\":_vm.validators.credentialsName},model:{value:(_vm.authorization.credentialsName),callback:function ($$v) {_vm.$set(_vm.authorization, \"credentialsName\", $$v)},expression:\"authorization.credentialsName\"}}),_c('div',[_c('HeaderActionButtons',{attrs:{\"prevent-back\":_vm.preventBack,\"prevent-save\":_vm.preventSave},on:{\"back\":_vm.back,\"save\":_vm.save}})],1)],1)]),_c('b-form',{attrs:{\"autocomplete\":\"off\"},on:{\"submit\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.save($event)}}},[_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.flowType\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"flowType\",\"value\":_vm.$t((\"authorization.\" + (_vm.flowTypesEnum[_vm.authorization.flowType].toLowerCase()))),\"disabled\":\"disabled\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.redirectUri\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"redirectUri\",\"value\":_vm.redirectUri,\"disabled\":\"disabled\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.clientId\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.clientId),expression:\"authorization.clientId\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.clientId'),\"id\":\"clientId\",\"state\":_vm.validators.clientId.state},model:{value:(_vm.authorization.clientId),callback:function ($$v) {_vm.$set(_vm.authorization, \"clientId\", $$v)},expression:\"authorization.clientId\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.clientSecret\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.clientSecret'),\"id\":\"clientSecret\",\"type\":\"password\"},model:{value:(_vm.authorization.clientSecret),callback:function ($$v) {_vm.$set(_vm.authorization, \"clientSecret\", $$v)},expression:\"authorization.clientSecret\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.scope\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.scopes),expression:\"authorization.scopes\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.scope'),\"id\":\"scopes\",\"state\":_vm.validators.scopes.state},model:{value:(_vm.authorization.scopes),callback:function ($$v) {_vm.$set(_vm.authorization, \"scopes\", $$v)},expression:\"authorization.scopes\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.tenantId\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.tenantId),expression:\"authorization.tenantId\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.tenantId'),\"id\":\"tenantId\",\"state\":_vm.validators.tenantId.state},model:{value:(_vm.authorization.tenantId),callback:function ($$v) {_vm.$set(_vm.authorization, \"tenantId\", $$v)},expression:\"authorization.tenantId\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.username\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.username),expression:\"authorization.username\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.username'),\"autocomplete\":\"off\",\"id\":\"username\",\"state\":_vm.validators.username.state},model:{value:(_vm.authorization.username),callback:function ($$v) {_vm.$set(_vm.authorization, \"username\", $$v)},expression:\"authorization.username\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.password\"))+\":\")]),_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:(_vm.authorization.password),expression:\"authorization.password\"}],staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.password'),\"type\":\"password\",\"autocomplete\":\"new-password\",\"id\":\"password\",\"state\":_vm.validators.password.state},model:{value:(_vm.authorization.password),callback:function ($$v) {_vm.$set(_vm.authorization, \"password\", $$v)},expression:\"authorization.password\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.authorizationId\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"placeholder\":_vm.$t('authorization.authorizationId'),\"id\":\"authorizationId\",\"disabled\":\"disabled\"},model:{value:(_vm.authorization.id),callback:function ($$v) {_vm.$set(_vm.authorization, \"id\", $$v)},expression:\"authorization.id\"}})],1),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.authorized\"))+\":\")]),_c('div',{staticClass:\"authorizedWrapper\"},[(_vm.authorization.authorized)?_c('svg',{staticClass:\"vc-icon_md icon-active icon\",attrs:{\"viewBox\":\"0 0 100 100\"}},[_c('use',{attrs:{\"xlink:href\":\"#success-icon\"}})]):_c('svg',{staticClass:\"vc-icon_md icon-inactive icon\",attrs:{\"viewBox\":\"0 0 100 100\"}},[_c('use',{attrs:{\"xlink:href\":\"#error-icon\"}})]),(_vm.authorization.authorized)?_c('span',[_vm._v(_vm._s(_vm.$t('authorization.authorized')))]):_c('span',[_vm._v(_vm._s(_vm.$t('authorization.notAuthorized')))])])]),(_vm.authorization.lastAuthorizationSuccessDate)?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.lastAuthorizationSuccessDate\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"lastAuthorizationSuccessDate\",\"disabled\":\"disabled\",\"value\":_vm.formatDate(_vm.authorization.lastAuthorizationSuccessDate)}})],1):_vm._e(),(_vm.authorization.lastAuthorizationRequestDate)?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.lastAuthorizationRequestDate\"))+\":\")]),_c('b-form-input',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"id\":\"lastAuthorizationRequestDate\",\"disabled\":\"disabled\",\"value\":_vm.formatDate(_vm.authorization.lastAuthorizationRequestDate)}})],1):_vm._e(),(!_vm.authorization.authorized && _vm.authorization.lastErrorMessage)?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.lastErrorMessage\"))+\":\")]),_c('b-form-textarea',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"rows\":\"5\",\"id\":\"lastErrorMessage\",\"disabled\":\"disabled\",\"value\":_vm.authorization.lastErrorMessage}})],1):_vm._e(),_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"},[_vm._v(_vm._s(_vm.$t(\"authorization.authorization\"))+\":\")]),_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.initiateAuthorization(false)}}},[_vm._v(_vm._s(_vm.$t(\"authorization.authorize\")))]),_c('b-button',{staticClass:\"no-wrap-button\",attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.initiateAuthorization(true)}}},[_vm._v(_vm._s(_vm.$t(\"authorization.generateAuthLink\")))])],1),(_vm.externalAuthorizationLink !='')?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"}),_c('b-form-textarea',{staticClass:\"vsc-input vsc-input-lg\",attrs:{\"rows\":\"15\",\"id\":\"externalAuthorizationLink\",\"disabled\":\"disabled\",\"value\":_vm.externalAuthorizationLink}})],1):_vm._e(),(_vm.externalAuthorizationLink !='')?_c('div',{staticClass:\"vsc-form-control align-items-center\"},[_c('label',{staticClass:\"vsc-property-label mt-3\"}),_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":_vm.copyExternalAuthorizeLink}},[_vm._v(_vm._s(_vm.$t(\"authorization.copyAuthLink\")))])],1):_vm._e()]),_c('unsaved-form-modal',{ref:\"UnsavedFormModal\",on:{\"continue\":_vm.onContinue}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Prop, Vue } from \"vue-property-decorator\";\r\nimport i18n from \"@/i18n\";\r\nimport { Route } from \"vue-router\";\r\nimport { Authorization, FlowTypesEnum } from \"@/services/authorizations/types\";\r\nimport {\r\n createAuthorization,\r\n getAuthorization,\r\n updateAuthorization,\r\n getRedirectUri,\r\n getOAuthJwtToken\r\n} from \"@/services/authorizations/authorizationService\";\r\nimport HeaderActionButtons from \"@/components/layouts/HeaderActionButtons.vue\";\r\nimport UnsavedFormModal from \"@/components/common/modals/UnsavedFormModal.vue\";\r\nimport { authorizationValidators } from \"@/components/authorizations/authorizationValidators\";\r\nimport { validateForm } from \"@/services/validation/validationService\";\r\nimport validate from \"@/directives/validate\";\r\nimport moment from \"moment\";\r\n\r\n@Component({\r\n beforeRouteLeave(to, from, next) {\r\n this.onBeforeRouteLeave(to, next);\r\n },\r\n components: { UnsavedFormModal, HeaderActionButtons },\r\n directives: {\r\n validate\r\n }\r\n})\r\nexport default class ROPCForm extends Vue {\r\n @Prop() authorizationId!: string;\r\n\r\n // local state\r\n authorization = {\r\n id: \"\",\r\n credentialsName: \"\",\r\n flowType: FlowTypesEnum.ResourceOwnerPasswordCredentialsFlow,\r\n url: \"https://login.microsoftonline.com/#tenantId/oauth2/v2.0/token\",\r\n authorized: false\r\n } as Authorization;\r\n\r\n priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization)) as Authorization;\r\n redirectUri = \"\";\r\n externalAuthorizationLink = \"\";\r\n\r\n i18n = i18n;\r\n flowTypesEnum = FlowTypesEnum;\r\n validators = authorizationValidators;\r\n preventSave = false;\r\n preventBack = false;\r\n nextRoute = \"\";\r\n routeParams = {};\r\n saveClicked = false;\r\n continue = false;\r\n fetchingActive = false;\r\n\r\n // lifecycle hooks\r\n async created() {\r\n this.fetchData();\r\n window.addEventListener(\"storage\", (event) => {\r\n if (event.storageArea !== localStorage) return;\r\n if (event.key === \"refresh\") {\r\n if (event.newValue === \"true\") {\r\n window.localStorage.setItem(\"refresh\", \"\");\r\n this.fetchData();\r\n }\r\n }\r\n });\r\n getRedirectUri().then(response => {\r\n this.redirectUri = response;\r\n });\r\n }\r\n\r\n // methods\r\n fetchData() {\r\n if (this.authorizationId || this.authorization.id !== \"\") {\r\n this.fetchingActive = true;\r\n getAuthorization(this.authorizationId ? this.authorizationId : this.authorization.id).then(response => {\r\n this.authorization = response;\r\n this.authorization.password = \"dummy-password\";\r\n this.authorization.clientSecret = \"dummy-secret\";\r\n this.priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization)) as Authorization;\r\n this.fetchingActive = false;\r\n });\r\n }\r\n }\r\n\r\n async save(back: boolean) : Promise {\r\n if (this.saveClicked) return;\r\n this.saveClicked = true;\r\n if (!await validateForm([this.validators])) {\r\n this.saveClicked = false;\r\n return;\r\n }\r\n // create or update\r\n if (this.authorization.id !== \"\") {\r\n await updateAuthorization(this.authorization);\r\n this.saveClicked = false;\r\n this.priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization));\r\n if (back) {\r\n this.$router.push({\r\n name: \"authorizations\"\r\n });\r\n }\r\n } else {\r\n const id = await createAuthorization(this.authorization);\r\n this.saveClicked = false;\r\n this.authorization.id = id;\r\n this.priorAuthorizationState = JSON.parse(JSON.stringify(this.authorization));\r\n if (back) {\r\n this.$router.push({\r\n name: \"authorizations\"\r\n });\r\n }\r\n }\r\n }\r\n\r\n back() {\r\n this.$router.push({\r\n name: \"authorizations\"\r\n });\r\n }\r\n\r\n onContinue(data: boolean) {\r\n this.continue = data;\r\n if (data) this.$router.push({ name: this.nextRoute, params: this.routeParams });\r\n this.nextRoute = \"\";\r\n }\r\n\r\n async initiateAuthorization(external: boolean) {\r\n await this.save(false);\r\n const token = await getOAuthJwtToken(this.authorization.id);\r\n const authorizationLink = `https://login.microsoftonline.com/${this.authorization.tenantId}/oauth2/v2.0/authorize?\r\n client_id=${this.authorization.clientId}\r\n &response_type=code\r\n &login_hint=${this.authorization.username}\r\n &redirect_uri=${encodeURI(this.redirectUri)}\r\n &response_mode=query\r\n &scope=${encodeURI(this.authorization.scopes)}\r\n &state=${token}`;\r\n\r\n if (external) {\r\n this.externalAuthorizationLink = authorizationLink;\r\n } else {\r\n this.authPopupWindow(authorizationLink, \"Authorize\", 500, 700);\r\n }\r\n }\r\n\r\n async copyExternalAuthorizeLink() {\r\n await navigator.clipboard.writeText(this.externalAuthorizationLink);\r\n }\r\n\r\n authPopupWindow(url: any, title: any, w: any, h: any) {\r\n // Fixes dual-screen position Most browsers Firefox\r\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\r\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\r\n\r\n const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;\r\n const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;\r\n\r\n const systemZoom = width / window.screen.availWidth;\r\n const left = (width - w) / 2 / systemZoom + dualScreenLeft;\r\n const top = (height - h) / 2 / systemZoom + dualScreenTop;\r\n const newWindow = window.open(url, title,\r\n `\r\n scrollbars=yes,\r\n width=${w / systemZoom},\r\n height=${h / systemZoom},\r\n top=${top},\r\n left=${left}\r\n `\r\n );\r\n\r\n if (window.focus && newWindow) newWindow.focus();\r\n }\r\n\r\n formatDate(date: Date) {\r\n return moment.utc(date).local().format(\"LLL\");\r\n }\r\n\r\n // computed\r\n get editMode() {\r\n return !!this.authorization.id;\r\n }\r\n\r\n // router events\r\n async onBeforeRouteLeave(to: Route, next: any) {\r\n if (this.saveClicked || this.continue || this.fetchingActive) {\r\n next();\r\n } else {\r\n this.nextRoute = to.name ? to.name : \"\";\r\n this.routeParams = to.params;\r\n const noChanges = this.lodash.isEqual(this.priorAuthorizationState, this.authorization);\r\n if (noChanges) {\r\n next();\r\n } else {\r\n next(false);\r\n (this.$refs.UnsavedFormModal as any).open();\r\n }\r\n }\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_ROPCForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_ROPCForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./_ROPCForm.vue?vue&type=template&id=389b1cea&scoped=true&\"\nimport script from \"./_ROPCForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./_ROPCForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./_ROPCForm.vue?vue&type=style&index=0&id=389b1cea&scoped=true&lang=css&\"\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 \"389b1cea\",\n null\n \n)\n\nexport default component.exports","import { DirectiveOptions } from \"vue\";\r\nimport { Vue } from \"vue-property-decorator\";\r\nimport { validateValue } from \"@/services/validation/validationService\";\r\nimport { ValidationType } from \"@/services/validation/types\";\r\n\r\nconst validate: DirectiveOptions = {\r\n bind(element, binding, vNode) {\r\n const componentContext = vNode.context as any;\r\n const el = element as HTMLInputElement;\r\n\r\n if (!componentContext || !componentContext.validators) return;\r\n\r\n const property = componentContext.validators[el.id];\r\n if (!property || !property.rules) return;\r\n\r\n Vue.set(property, \"value\", binding.value);\r\n Vue.set(property, \"active\", true);\r\n\r\n element.addEventListener(\"input\", (event) => {\r\n Vue.set(property, \"value\", el.value);\r\n\r\n if (binding.value && binding.value.confirm) {\r\n const matchRule = (property.rules as any[]).find(x => x.type === ValidationType.Confirm);\r\n const confirmProperty = componentContext.validators[binding.value.confirm];\r\n matchRule.value = confirmProperty.value;\r\n }\r\n validateValue(property).then(response => {\r\n Vue.set(property, \"message\", response.message);\r\n Vue.set(property, \"state\", response.state);\r\n });\r\n });\r\n },\r\n // we use update for setting the value of already populated form fields\r\n update(element, binding, vNode) {\r\n const componentContext = vNode.context as any;\r\n const property = componentContext.validators[element.id];\r\n Vue.set(property, \"value\", binding.value);\r\n },\r\n unbind(element, binding, vNode) {\r\n const componentContext = vNode.context as any;\r\n const property = componentContext.validators[element.id];\r\n Vue.set(property, \"state\", null);\r\n Vue.set(property, \"message\", \"\");\r\n Vue.set(property, \"value\", \"\");\r\n Vue.set(property, \"active\", false);\r\n }\r\n};\r\n\r\nexport default validate;\r\n","export interface Authorization {\r\n id: string,\r\n clientId: string;\r\n clientSecret: string;\r\n url: string;\r\n redirectUri: string;\r\n scopes: string;\r\n username: string;\r\n password: string;\r\n createdOn: Date;\r\n modifiedOn: Date;\r\n flowType: FlowTypesEnum;\r\n refreshToken: string;\r\n credentialsName: string;\r\n tenantId: string;\r\n authorized: boolean;\r\n lastAuthorizationSuccessDate: Date | null;\r\n lastAuthorizationRequestDate: Date | null;\r\n lastErrorMessage: string;\r\n}\r\n\r\nexport interface AuthorizationInfo {\r\n id: string,\r\n credentialsName: string;\r\n username: string;\r\n createdOn: Date;\r\n modifiedOn: Date;\r\n modifiedById: string;\r\n modifiedBy: string;\r\n flowType: FlowTypesEnum;\r\n lastAuthorizationSuccessDate: Date | null;\r\n lastAuthorizationRequestDate: Date | null;\r\n}\r\n\r\nexport enum FlowTypesEnum\r\n{\r\n AuthorizationCodeFlow,\r\n ClientCredentialFlow,\r\n ResourceOwnerPasswordCredentialsFlow\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('b-modal',{attrs:{\"centered\":\"\",\"id\":\"modal-navigateFromUnsavedForm\"},scopedSlots:_vm._u([{key:\"modal-footer\",fn:function(){return [_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":_vm.confirm}},[_vm._v(_vm._s(_vm.$t(\"common.btnYesContinue\")))]),_c('b-button',{attrs:{\"variant\":\"dark\"},on:{\"click\":_vm.decline}},[_vm._v(_vm._s(_vm.$t(\"common.btnNo\")))])]},proxy:true}])},[_c('div',{staticClass:\"confirmation-modal-body\"},[_c('svg',{staticClass:\"vc-icon_xl ver-ar fill-danger\",attrs:{\"viewBox\":\"0 0 100 100\"}},[_c('use',{attrs:{\"xlink:href\":\"#delete-icon\"}})]),_c('h2',[_vm._v(_vm._s(_vm.$t(\"common.unsavedFormTitle\")))]),_c('small',[_vm._v(_vm._s(_vm.$t(\"common.unsavedFormDescription\")))])])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue } from \"vue-property-decorator\";\r\n\r\n@Component\r\nexport default class UnsavedFormModal extends Vue {\r\n open() {\r\n this.$bvModal.show(\"modal-navigateFromUnsavedForm\");\r\n }\r\n\r\n decline() {\r\n this.$emit(\"continue\", false);\r\n this.$bvModal.hide(\"modal-navigateFromUnsavedForm\");\r\n }\r\n\r\n confirm() {\r\n this.$emit(\"continue\", true);\r\n this.$bvModal.hide(\"modal-navigateFromUnsavedForm\");\r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnsavedFormModal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UnsavedFormModal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./UnsavedFormModal.vue?vue&type=template&id=f971da18&\"\nimport script from \"./UnsavedFormModal.vue?vue&type=script&lang=ts&\"\nexport * from \"./UnsavedFormModal.vue?vue&type=script&lang=ts&\"\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 null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=style&index=0&id=1317f3f0&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=style&index=0&id=1317f3f0&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"abg\",rawName:\"v-abg\"}],staticClass:\"actionButtonGroup\",class:{ sticky : _vm.sticky }},[(_vm.showSaveButton)?_c('b-button',{attrs:{\"disabled\":_vm.preventSave,\"variant\":\"primary\"},on:{\"click\":_vm.save}},[_vm._v(_vm._s(_vm.$t(\"common.save\")))]):_vm._e(),(_vm.showSaveButton && _vm.isAdmin)?_c('b-button',{attrs:{\"disabled\":_vm.preventSave,\"variant\":\"primary\"},on:{\"click\":_vm.saveAndBack}},[_vm._v(_vm._s(_vm.$t(\"common.saveAndBack\")))]):_vm._e(),(_vm.editorStatus && !_vm.isAdmin)?_c('b-button',{staticClass:\"btn-combine\",attrs:{\"disabled\":_vm.preventBack,\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.$emit('newPostBtn')}}},[_c('span',{staticClass:\"iconBox\"},[_c('svg',{staticClass:\"vc-icon\",attrs:{\"viewBox\":\"0 0 9.9 7.5\"}},[_c('use',{attrs:{\"xlink:href\":\"#plus-icon\"}})])]),_c('span',{staticClass:\"post-combine\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"posts.newPost\"))+\" \")])]):_vm._e(),(_vm.editorStatus && !_vm.isAdmin)?_c('b-button',{staticClass:\"btn-combine\",attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.$emit('previewEvent')}}},[_c('span',{staticClass:\"iconBox\"},[_c('svg',{staticClass:\"vc-icon\",attrs:{\"viewBox\":\"0 0 9 7\"}},[_c('use',{attrs:{\"xlink:href\":\"#preview-icon\"}})])]),_c('span',{staticClass:\"post-combine\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"common.preview\"))+\" \")])]):_vm._e(),_c('b-button',{staticClass:\"ml-1\",attrs:{\"disabled\":_vm.preventBack,\"variant\":\"secondary\"},on:{\"click\":_vm.back}},[_vm._v(_vm._s(_vm.$t(\"common.back\")))])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Vue, Prop, Watch } from \"vue-property-decorator\";\r\nimport { Getter } from \"vuex-class\";\r\nimport { HavePermition, PermitionEnum } from \"@/components/security/Permitions\";\r\n\r\nconst namespace: string = \"authentication\";\r\n\r\nvar scroll: any;\r\n\r\n@Component({\r\n directives: {\r\n abg: {\r\n inserted: function (element, binding, vnode) {\r\n var offset = (window.pageYOffset + element.getBoundingClientRect().top) - 50; // 50 is the height of the topbar\r\n scroll = function () {\r\n var doc = document.documentElement;\r\n var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\r\n if (top >= offset) (vnode.context as any).sticky = true;\r\n else (vnode.context as any).sticky = false;\r\n };\r\n window.addEventListener(\"scroll\", scroll, false);\r\n },\r\n unbind: function (element, binding, vnode) {\r\n window.removeEventListener(\"scroll\", scroll, false);\r\n }\r\n }\r\n }\r\n})\r\nexport default class HeaderActionButtons extends Vue {\r\n @Prop() checkPermition!: PermitionEnum;\r\n @Prop({ default: false }) preventSave!: boolean;\r\n @Prop({ default: false }) preventBack!: boolean;\r\n @Getter(\"getCurrentUser\", { namespace }) getCurrentUser: any;\r\n\r\n // local\r\n permitionEnum = PermitionEnum;\r\n havePermition = HavePermition;\r\n editorStatus = false;\r\n\r\n get isAdmin() : boolean {\r\n return this.havePermition(this.getCurrentUser.permissions,\r\n this.permitionEnum[this.permitionEnum.AdminPrivilege]);\r\n }\r\n\r\n sticky = false;\r\n\r\n save() {\r\n if (!this.isAdmin) this.$emit(\"save\", true);\r\n else this.$emit(\"save\", false);\r\n }\r\n\r\n saveAndBack() {\r\n this.$emit(\"save\", true);\r\n }\r\n\r\n back() {\r\n this.$emit(\"back\");\r\n }\r\n\r\n // header component is detroyed and rebuilt in every page load\r\n // so watchers are unless in this case\r\n mounted() {\r\n this.editorStatus = this.$route.name === \"editorupdatechannel\";\r\n }\r\n\r\n get showSaveButton(): boolean {\r\n return this.checkPermition !== null && this.checkPermition !== undefined\r\n ? this.havePermition(this.getCurrentUser.permissions, this.permitionEnum[this.checkPermition]) : true;\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderActionButtons.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./HeaderActionButtons.vue?vue&type=template&id=1317f3f0&scoped=true&\"\nimport script from \"./HeaderActionButtons.vue?vue&type=script&lang=ts&\"\nexport * from \"./HeaderActionButtons.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./HeaderActionButtons.vue?vue&type=style&index=0&id=1317f3f0&scoped=true&lang=css&\"\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 \"1317f3f0\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}