diff --git a/OAuth2.php b/OAuth2.php index 5e57d90..23ca7c7 100644 --- a/OAuth2.php +++ b/OAuth2.php @@ -154,6 +154,7 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'OAuth2_ClientSecretMaskedHelp'; $translationKeys[] = 'OAuth2_ClientSecretVisibleHelp'; $translationKeys[] = 'OAuth2_AdminDescriptionPlaceholder'; + $translationKeys[] = 'OAuth2_AdminRotatedNotification'; } public function getTablesInstalled(&$allTablesInstalled) diff --git a/lang/en.json b/lang/en.json index 5431060..194e77b 100644 --- a/lang/en.json +++ b/lang/en.json @@ -55,6 +55,7 @@ "AdminCreated": "Client %s created.", "AdminUpdated": "Client %s updated.", "AdminRotated": "New secret for %s", + "AdminRotatedNotification": "The client secret has been rotated successfully. Copy the new secret now, as it is only shown once. If you lose access you can rotate the secret again, and your current secret will be invalidated.", "AdminPaused": "Client %s has been paused successfully.", "AdminResumed": "Client %s has been resumed successfully.", "AdminDeleted": "Client %s has been deleted successfully.", diff --git a/vue/dist/OAuth2.css b/vue/dist/OAuth2.css index 8ffe29f..ae887e2 100644 --- a/vue/dist/OAuth2.css +++ b/vue/dist/OAuth2.css @@ -1 +1 @@ -.client-id-code[data-v-4e1cf580]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-4e1cf580]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-663d8135]{margin-bottom:0}.client-secret-code[data-v-663d8135]{word-break:break-word;white-space:pre-wrap;overflow-wrap:anywhere;margin:0} \ No newline at end of file +.client-id-code[data-v-4e1cf580]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-4e1cf580]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-ba4724a2]{margin-bottom:0}.client-secret-code[data-v-ba4724a2]{word-break:break-word;white-space:pre-wrap;overflow-wrap:anywhere;margin:0} \ No newline at end of file diff --git a/vue/dist/OAuth2.umd.js b/vue/dist/OAuth2.umd.js index 4d0f005..91e2bd6 100644 --- a/vue/dist/OAuth2.umd.js +++ b/vue/dist/OAuth2.umd.js @@ -126,6 +126,17 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__; module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; +/***/ }), + +/***/ "9601": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_ba4724a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cd6a"); +/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_ba4724a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_ba4724a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + + /***/ }), /***/ "a5a2": @@ -135,22 +146,11 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__; /***/ }), -/***/ "aabf": +/***/ "cd6a": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin -/***/ }), - -/***/ "d8e2": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_663d8135_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aabf"); -/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_663d8135_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_663d8135_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); -/* unused harmony reexport * */ - - /***/ }), /***/ "fae3": @@ -416,67 +416,67 @@ Listvue_type_script_lang_ts.render = Listvue_type_template_id_4e1cf580_scoped_tr Listvue_type_script_lang_ts.__scopeId = "data-v-4e1cf580" /* harmony default export */ var List = (Listvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=663d8135&scoped=true +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=ba4724a2&scoped=true -const Editvue_type_template_id_663d8135_scoped_true_withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-663d8135"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); -const Editvue_type_template_id_663d8135_scoped_true_hoisted_1 = { +const Editvue_type_template_id_ba4724a2_scoped_true_withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-ba4724a2"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_1 = { class: "oauth2-admin oauth2-admin-edit" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_2 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_2 = { class: "ui-confirm", ref: "confirmRotateClient" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_3 = ["value"]; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_4 = ["value"]; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_5 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_3 = ["value"]; +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_4 = ["value"]; +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_5 = { key: 0 }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_6 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_6 = { class: "loadingPiwik" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_7 = /*#__PURE__*/Editvue_type_template_id_663d8135_scoped_true_withScopeId(() => /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_7 = /*#__PURE__*/Editvue_type_template_id_ba4724a2_scoped_true_withScopeId(() => /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1)); -const Editvue_type_template_id_663d8135_scoped_true_hoisted_8 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_8 = { class: "row" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_9 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_9 = { class: "row" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_10 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_10 = { key: 0, class: "row" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_11 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_11 = { key: 1, class: "row oauth2-secret-head" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_12 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_12 = { class: "col s12" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_13 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_13 = { key: 2, class: "oauth2-secret-div form-group row matomo-form-field" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_14 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_14 = { class: "col s12 m6" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_15 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_15 = { class: "copy-secret-wrapper-div" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_16 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_16 = { key: 0, class: "client-secret-code" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_17 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_17 = { key: 1, class: "client-secret-code" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_18 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_18 = { class: "col s12 m6" }; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_19 = ["innerHTML"]; -const Editvue_type_template_id_663d8135_scoped_true_hoisted_20 = { +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_19 = ["innerHTML"]; +const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_20 = { class: "row", name: "type" }; @@ -498,32 +498,32 @@ const _hoisted_25 = ["disabled"]; const _hoisted_26 = { class: "entityCancel" }; -function Editvue_type_template_id_663d8135_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { +function Editvue_type_template_id_ba4724a2_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); const _directive_copy_to_clipboard = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("copy-to-clipboard"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.confirmRotateLabel), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.confirmRotateLabel), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, Editvue_type_template_id_663d8135_scoped_true_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, Editvue_type_template_id_ba4724a2_scoped_true_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, Editvue_type_template_id_663d8135_scoped_true_hoisted_4)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + }, null, 8, Editvue_type_template_id_ba4724a2_scoped_true_hoisted_4)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { "content-title": _ctx.contentTitle }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [_ctx.loading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", Editvue_type_template_id_663d8135_scoped_true_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_663d8135_scoped_true_hoisted_6, [Editvue_type_template_id_663d8135_scoped_true_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("form", { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [_ctx.loading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_6, [Editvue_type_template_id_ba4724a2_scoped_true_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("form", { key: 1, onSubmit: _cache[8] || (_cache[8] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])((...args) => _ctx.submit && _ctx.submit(...args), ["prevent"])) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "name", modelValue: _ctx.form.name, "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.form.name = $event), "inline-help": _ctx.translate('OAuth2_AdminNameHelp'), title: _ctx.translate('OAuth2_AdminName') - }, null, 8, ["modelValue", "inline-help", "title"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "inline-help", "title"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "textarea", name: "description", modelValue: _ctx.form.description, @@ -535,19 +535,19 @@ function Editvue_type_template_id_663d8135_scoped_true_render(_ctx, _cache, $pro "inline-help": _ctx.translate('OAuth2_AdminDescriptionHelp'), title: _ctx.translate('OAuth2_AdminDescription'), placeholder: _ctx.translate('OAuth2_AdminDescriptionPlaceholder') - }, null, 8, ["modelValue", "inline-help", "title", "placeholder"])]), _ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "inline-help", "title", "placeholder"])]), _ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "client_id", "model-value": _ctx.clientId, title: _ctx.translate('OAuth2_AdminClientId'), disabled: true - }, null, 8, ["model-value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSecretPanel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", Editvue_type_template_id_663d8135_scoped_true_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_ClientSecret')) + " ", 1), _ctx.canRegenerateSecret ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }, null, 8, ["model-value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSecretPanel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_ClientSecret')) + " ", 1), _ctx.canRegenerateSecret ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, onClick: _cache[2] || (_cache[2] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])((...args) => _ctx.rotateSecret && _ctx.rotateSecret(...args), ["prevent"])) - }, " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminRotateSecret')) + ") ", 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSecretPanel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_15, [_ctx.visibleSecret ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_663d8135_scoped_true_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1)])), [[_directive_copy_to_clipboard, {}]]) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_663d8135_scoped_true_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1))])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminRotateSecret')) + ") ", 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSecretPanel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_15, [_ctx.visibleSecret ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1)])), [[_directive_copy_to_clipboard, {}]]) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1))])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "form-help", innerHTML: _ctx.$sanitize(_ctx.secretInlineHelp) - }, null, 8, Editvue_type_template_id_663d8135_scoped_true_hoisted_19)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_663d8135_scoped_true_hoisted_20, [!_ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Field, { + }, null, 8, Editvue_type_template_id_ba4724a2_scoped_true_hoisted_19)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_20, [!_ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Field, { key: 0, uicontrol: "select", name: "type", @@ -598,7 +598,7 @@ function Editvue_type_template_id_663d8135_scoped_true_render(_ctx, _cache, $pro _: 1 }, 8, ["content-title"])]); } -// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=663d8135&scoped=true +// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=ba4724a2&scoped=true // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); @@ -762,10 +762,7 @@ function getDefaultForm(scopes) { }).then(response => { if (response !== null && response !== void 0 && response.secret) { this.visibleSecret = response.secret; - const safeClientName = external_CoreHome_["Matomo"].helper.htmlEntities(this.form.name || this.clientId); - const rotatedMessage = this.translate('OAuth2_AdminRotated', safeClientName); - const secretMessage = this.translate('OAuth2_ClientSecretHelp'); - const message = [rotatedMessage, secretMessage].filter(Boolean).join(' '); + const message = this.translate('OAuth2_AdminRotatedNotification'); this.showNotification(`${message}`, 'success', 'transient'); } }).finally(() => { @@ -860,8 +857,8 @@ function getDefaultForm(scopes) { })); // CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=script&lang=ts -// EXTERNAL MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=style&index=0&id=663d8135&scoped=true&lang=css -var Editvue_type_style_index_0_id_663d8135_scoped_true_lang_css = __webpack_require__("d8e2"); +// EXTERNAL MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css +var Editvue_type_style_index_0_id_ba4724a2_scoped_true_lang_css = __webpack_require__("9601"); // CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue @@ -869,8 +866,8 @@ var Editvue_type_style_index_0_id_663d8135_scoped_true_lang_css = __webpack_requ -Editvue_type_script_lang_ts.render = Editvue_type_template_id_663d8135_scoped_true_render -Editvue_type_script_lang_ts.__scopeId = "data-v-663d8135" +Editvue_type_script_lang_ts.render = Editvue_type_template_id_ba4724a2_scoped_true_render +Editvue_type_script_lang_ts.__scopeId = "data-v-ba4724a2" /* harmony default export */ var Edit = (Editvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?vue&type=script&lang=ts diff --git a/vue/dist/OAuth2.umd.js.map b/vue/dist/OAuth2.umd.js.map index 6168326..e4a6c4f 100644 --- a/vue/dist/OAuth2.umd.js.map +++ b/vue/dist/OAuth2.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?542c","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?441d","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?d7f6","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?7582","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?0502","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a589","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?4a8b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/index.ts","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;AClFA;AAAA;AAAA;;;;;;;;ACAA,mD;;;;;;;ACAA,uC;;;;;;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,IAAI,CAAC,OAAO,CAAC;IAClC;GACD;EACD,QAAQ,EAAE;IACR,UAAU;MACR,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc;IAC9B;EACD;CACF,CAAC,E;;AC7H6f,C;;ACA5b;AACV;AACL;AACpD,6BAAM,UAAU,MAAM;;AAEP,wE;;ACLf;;;;;AAKG;;;ACLqB;AACF","file":"OAuth2.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// extracted by mini-css-extract-plugin","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=663d8135&scoped=true&lang=css\"","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n };\n },\n methods: {\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const instanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n\n setTimeout(() => {\n NotificationsStore.scrollToNotification(instanceId);\n }, 200);\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n toggleClientStatus(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmToggleLabel = client.active\n ? this.translate('OAuth2_AdminPauseConfirm', safeClientName)\n : this.translate('OAuth2_AdminResumeConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmToggleClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.setClientActive',\n clientId: client.client_id,\n active: client.active ? '0' : '1',\n }).then((response) => {\n if (response?.client) {\n this.removeNotifications();\n const safeUpdatedClientName = Matomo.helper.htmlEntities(\n response.client.name || response.client.client_id,\n );\n this.showNotification(\n response.client.active\n ? this.translate('OAuth2_AdminResumed', safeUpdatedClientName)\n : this.translate('OAuth2_AdminPaused', safeUpdatedClientName),\n 'success',\n );\n this.$emit('updated', response.client);\n }\n });\n },\n });\n },\n deleteClient(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmDeleteLabel = this.translate('OAuth2_AdminDeleteConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"","import { render } from \"./List.vue?vue&type=template&id=4e1cf580&scoped=true\"\nimport script from \"./List.vue?vue&type=script&lang=ts\"\nexport * from \"./List.vue?vue&type=script&lang=ts\"\n\nimport \"./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-4e1cf580\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const safeClientName = Matomo.helper.htmlEntities(this.form.name || this.clientId);\n const rotatedMessage = this.translate('OAuth2_AdminRotated', safeClientName);\n const secretMessage = this.translate('OAuth2_ClientSecretHelp');\n const message = [rotatedMessage, secretMessage].filter(Boolean).join(' ');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"","import { render } from \"./Edit.vue?vue&type=template&id=663d8135&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=663d8135&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-663d8135\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"","import { render } from \"./Manage.vue?vue&type=template&id=f7d6db3a\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport { default as Oauth2AdminApp } from './OAuthClients/Manage.vue';\n","import './setPublicPath'\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?542c","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?441d","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a32e","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?0502","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a589","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?4a8b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/index.ts","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;AClFA;AAAA;AAAA;;;;;;;;ACAA,mD;;;;;;;ACAA,uC;;;;;;;ACAA,mD;;;;;;;;ACAA;AAAA;AAAA;;;;;;;;ACAA,kD;;;;;;;ACAA,uC;;;;;;;;;;;;;;;ACAA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACe,sDAAI;;;;;;;;ECpBZ,KAAK,EAAC;AAAc;;;;+EAAzB,4EAiBM,OAjBN,UAiBM,G,CAfK,eAAU,I,sEADnB,qEAOE;;IALC,OAAO,EAAE,YAAO;IAChB,QAAM,EAAE,iBAAY;IACpB,MAAI,EAAE,eAAU;IAChB,SAAO,EAAE,oBAAe;IACxB,SAAO,EAAE;qJAEZ,qEAOE;;IALC,WAAS,EAAE,mBAAc;IACzB,MAAM,EAAE,WAAM;IACd,gBAAc,EAAE,WAAM;IACt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,OAAO,CAAC,MAAM,CAAE,MAAM,IAAK,MAAM,CAAC,SAAS,KAAK,QAAQ,CAAC;IAC/E,CAAC;IACD,eAAe,CAAC,aAAqB;MACnC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CACjC,MAAM,IAAK,MAAM,CAAC,SAAS,KAAK,aAAa,CAAC,SAAS,CACzD;MACD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB;MACD;MAED,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,aAAa,CAAC;MAC5C,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;IAClC;GACD;EACD,QAAQ,EAAE;IACR,UAAU;MACR,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc;IAC9B;EACD;CACF,CAAC,E;;AC7H6f,C;;ACA5b;AACV;AACL;AACpD,6BAAM,UAAU,MAAM;;AAEP,wE;;ACLf;;;;;AAKG;;;ACLqB;AACF","file":"OAuth2.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// extracted by mini-css-extract-plugin","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n };\n },\n methods: {\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const instanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n\n setTimeout(() => {\n NotificationsStore.scrollToNotification(instanceId);\n }, 200);\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n toggleClientStatus(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmToggleLabel = client.active\n ? this.translate('OAuth2_AdminPauseConfirm', safeClientName)\n : this.translate('OAuth2_AdminResumeConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmToggleClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.setClientActive',\n clientId: client.client_id,\n active: client.active ? '0' : '1',\n }).then((response) => {\n if (response?.client) {\n this.removeNotifications();\n const safeUpdatedClientName = Matomo.helper.htmlEntities(\n response.client.name || response.client.client_id,\n );\n this.showNotification(\n response.client.active\n ? this.translate('OAuth2_AdminResumed', safeUpdatedClientName)\n : this.translate('OAuth2_AdminPaused', safeUpdatedClientName),\n 'success',\n );\n this.$emit('updated', response.client);\n }\n });\n },\n });\n },\n deleteClient(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmDeleteLabel = this.translate('OAuth2_AdminDeleteConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"","import { render } from \"./List.vue?vue&type=template&id=4e1cf580&scoped=true\"\nimport script from \"./List.vue?vue&type=script&lang=ts\"\nexport * from \"./List.vue?vue&type=script&lang=ts\"\n\nimport \"./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-4e1cf580\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"","import { render } from \"./Manage.vue?vue&type=template&id=f7d6db3a\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport { default as Oauth2AdminApp } from './OAuthClients/Manage.vue';\n","import './setPublicPath'\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file diff --git a/vue/dist/OAuth2.umd.min.js b/vue/dist/OAuth2.umd.min.js index 35daf60..102839c 100644 --- a/vue/dist/OAuth2.umd.min.js +++ b/vue/dist/OAuth2.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["OAuth2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["OAuth2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,i){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/OAuth2/vue/dist/",i(i.s="fae3")}({"05ab":function(e,t,i){"use strict";i("5e25")},"19dc":function(t,i){t.exports=e},"5e25":function(e,t,i){},"8bbf":function(e,i){e.exports=t},a5a2:function(e,t){e.exports=i},aabf:function(e,t,i){},d8e2:function(e,t,i){"use strict";i("aabf")},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return pe})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(i.p=l[1])}var o=i("8bbf");const c={class:"oauth2-admin"};function a(e,t,i,n,l,a){const r=Object(o["resolveComponent"])("Oauth2ClientList"),s=Object(o["resolveComponent"])("Oauth2ClientEdit");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:1,"client-id":e.editedClientId,scopes:e.scopes,"initial-secret":e.secret,onCancel:e.showList,onSaved:e.onClientSaved},null,8,["client-id","scopes","initial-secret","onCancel","onSaved"])):(Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:0,clients:e.clients,onCreate:e.createClient,onEdit:e.editClient,onDeleted:e.onClientDeleted,onUpdated:e.onClientUpdated},null,8,["clients","onCreate","onEdit","onDeleted","onUpdated"]))])}var r=i("19dc");const s=e=>(Object(o["pushScopeId"])("data-v-4e1cf580"),e=e(),Object(o["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},m={class:"ui-confirm",ref:"confirmDeleteClient"},u=["value"],h=["value"],p={class:"ui-confirm",ref:"confirmToggleClient"},O=["value"],b=["value"],f={style:{width:"180px"}},j={key:0},A=["title"],y={class:"client-id-code"},_={class:"redirect-uri"},C={class:"created-at"},v=["onClick","title"],g=["onClick","title"],N=["onClick","title"],E={key:1},S={colspan:"8"},V={class:"tableActionBar"},k=s(()=>Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1));function B(e,t,i,n,l,c){const a=Object(o["resolveComponent"])("ContentBlock"),r=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",d,[Object(o["createElementVNode"])("div",m,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmDeleteLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,u),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,h)],512),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmToggleLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,O),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,b)],512),Object(o["createVNode"])(a,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientsDescriptions")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(o["createElementVNode"])("th",f,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",j,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.clients,t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.client_id},[Object(o["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(o["toDisplayString"])(t.name),9,A),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.typeOptions[t.type]),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])((t.grant_types||[]).join(", ")),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("code",y,Object(o["toDisplayString"])(t.client_id),1)]),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.redirect_uris||[],e=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:e},[Object(o["createElementVNode"])("code",_,Object(o["toDisplayString"])(e),1)]))),128))]),Object(o["createElementVNode"])("td",C,Object(o["toDisplayString"])(t.created_at),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("button",{class:Object(o["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(o["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,v),Object(o["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(o["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,g),Object(o["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(o["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,N)])]))),128))])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",E,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",S,Object(o["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[r]]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("a",{class:"createNewClient",onClick:t[0]||(t[0]=Object(o["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[k,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}const D="oauth2clientlist";var w=Object(o["defineComponent"])({name:"Oauth2ClientList",props:{clients:{type:Array,required:!0}},emits:["create","edit","deleted","updated"],components:{ContentBlock:r["ContentBlock"]},directives:{ContentTable:r["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",typeOptions:{confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")}}},methods:{showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:D,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){r["NotificationsStore"].remove(D),r["NotificationsStore"].remove("ajaxHelper")},toggleClientStatus(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.setClientActive",clientId:e.client_id,active:e.active?"0":"1"}).then(e=>{if(null!==e&&void 0!==e&&e.client){this.removeNotifications();const t=r["Matomo"].helper.htmlEntities(e.client.name||e.client.client_id);this.showNotification(e.client.active?this.translate("OAuth2_AdminResumed",t):this.translate("OAuth2_AdminPaused",t),"success"),this.$emit("updated",e.client)}})}})},deleteClient(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:e.client_id}).then(i=>{null!==i&&void 0!==i&&i.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",t),"success"),this.$emit("deleted",e.client_id))})}})}}});i("05ab");w.render=B,w.__scopeId="data-v-4e1cf580";var M=w;const I=e=>(Object(o["pushScopeId"])("data-v-663d8135"),e=e(),Object(o["popScopeId"])(),e),T={class:"oauth2-admin oauth2-admin-edit"},x={class:"ui-confirm",ref:"confirmRotateClient"},H=["value"],P=["value"],U={key:0},L={class:"loadingPiwik"},R=I(()=>Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),G={class:"row"},$={class:"row"},q={key:0,class:"row"},F={key:1,class:"row oauth2-secret-head"},z={class:"col s12"},Y={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},X={class:"col s12 m6"},J={class:"copy-secret-wrapper-div"},K={key:0,class:"client-secret-code"},Q={key:1,class:"client-secret-code"},W={class:"col s12 m6"},Z=["innerHTML"],ee={class:"row",name:"type"},te={class:"row",name:"grantType"},ie={class:"row",name:"scopes"},ne={class:"row"},le={class:"row"},oe=["disabled"],ce={class:"entityCancel"};function ae(e,t,i,n,l,c){const a=Object(o["resolveComponent"])("Field"),r=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmRotateLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,H),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,P)],512),Object(o["createVNode"])(r,{"content-title":e.contentTitle},{default:Object(o["withCtx"])(()=>[e.loading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",U,[Object(o["createElementVNode"])("span",L,[R,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:1,onSubmit:t[8]||(t[8]=Object(o["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(o["createElementVNode"])("div",G,[Object(o["createVNode"])(a,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",$,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.description=t),rows:1,"ui-control-attributes":{style:"min-height: auto;"},"inline-help":e.translate("OAuth2_AdminDescriptionHelp"),title:e.translate("OAuth2_AdminDescription"),placeholder:e.translate("OAuth2_AdminDescriptionPlaceholder")},null,8,["modelValue","inline-help","title","placeholder"])]),e.isEditMode?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createVNode"])(a,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",F,[Object(o["createElementVNode"])("label",z,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,onClick:t[2]||(t[2]=Object(o["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(o["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Y,[Object(o["createElementVNode"])("div",X,[Object(o["createElementVNode"])("div",J,[e.visibleSecret?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",K,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.displayedSecret),1)])),[[s,{}]]):(Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",Q,Object(o["toDisplayString"])(e.displayedSecret),1))])]),Object(o["createElementVNode"])("div",W,[Object(o["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,Z)])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ee,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:1,uicontrol:"text",name:"type","model-value":e.typeOptions[e.form.type]||e.form.type,title:e.translate("OAuth2_AdminType"),disabled:!0},null,8,["model-value","title"])):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.type=t),title:e.translate("OAuth2_AdminType"),"inline-help":e.translate("OAuth2_AdminTypeHelp","",""),options:e.typeOptions},null,8,["modelValue","title","inline-help","options"]))]),Object(o["createElementVNode"])("div",te,[Object(o["createVNode"])(a,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.grant_types=t),"inline-help":e.translate("OAuth2_AdminGrantTypesHelp"),title:e.translate("OAuth2_AdminClientGrants")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ie,[Object(o["createVNode"])(a,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ne,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.redirect_uris=t),placeholder:"https://example.com/callback","inline-help":e.translate("OAuth2_AdminRedirectUrisHelp"),title:e.translate("OAuth2_AdminRedirectUris")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",le,[Object(o["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(o["toDisplayString"])(e.submitLabel),9,oe)]),Object(o["createElementVNode"])("div",ce,[Object(o["createElementVNode"])("a",{onClick:t[7]||(t[7]=Object(o["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}var re=i("a5a2");const se="oauth2clientedit";function de(e){const t=Object.keys(e||{})[0]||"";return{name:"",description:"",type:"confidential",grant_types:["authorization_code","client_credentials","refresh_token"],scope:t,redirect_uris:"",active:!0}}var me=Object(o["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:r["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:r["ContentBlock"],Field:re["Field"]},data(){const e={confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},t={authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")};return{loading:!1,confirmRotateLabel:"",typeOptions:e,grantOptions:t,form:de(this.scopes),visibleSecret:this.initialSecret}},created(){this.init()},watch:{clientId(){this.init()},initialSecret(e){this.visibleSecret=e},"form.type":"onFormTypeChange"},computed:{isEditMode(){return"0"!==this.clientId},contentTitle(){return this.isEditMode?this.translate("OAuth2_AdminEditTitle"):this.translate("OAuth2_AdminCreateTitle")},submitLabel(){return this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminSave")},visibleGrantOptions(){if("public"===this.form.type){const e={};return this.grantOptions.authorization_code&&(e.authorization_code=this.grantOptions.authorization_code),this.grantOptions.refresh_token&&(e.refresh_token=this.grantOptions.refresh_token),e}return this.grantOptions},showSecretPanel(){return"confidential"===this.form.type&&(this.isEditMode||!!this.visibleSecret)},canRegenerateSecret(){return this.isEditMode&&"confidential"===this.form.type},displayedSecret(){return this.visibleSecret||"*************"},secretInlineHelp(){return this.visibleSecret?this.translate("OAuth2_ClientSecretVisibleHelp"):this.translate("OAuth2_ClientSecretMaskedHelp")}},methods:{init(){this.removeNotifications(),this.form=de(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.getClient",clientId:this.clientId}).then(e=>{this.form={name:e.name||"",description:e.description||"",type:e.type||"confidential",grant_types:e.grant_types||[],scope:e.scopes&&e.scopes[0]||Object.keys(this.scopes||{})[0]||"",redirect_uris:(e.redirect_uris||[]).join("\n"),active:!!e.active}}).finally(()=>{this.loading=!1}))},onFormTypeChange(e){"public"===e&&this.form.grant_types.includes("client_credentials")&&(this.form.grant_types=this.form.grant_types.filter(e=>"client_credentials"!==e)),"public"===e&&(this.visibleSecret="")},rotateSecret(){this.canRegenerateSecret&&(this.confirmRotateLabel=this.translate("OAuth2_AdminRotateConfirm",this.form.name||this.clientId),r["Matomo"].helper.modalConfirm(this.$refs.confirmRotateClient,{yes:()=>{this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=r["Matomo"].helper.htmlEntities(this.form.name||this.clientId),i=this.translate("OAuth2_AdminRotated",t),n=this.translate("OAuth2_ClientSecretHelp"),l=[i,n].filter(Boolean).join(" ");this.showNotification(`${l}`,"success","transient")}}).finally(()=>{this.loading=!1})}}))},submit(){if(this.removeNotifications(),!this.checkRequiredFieldsAreSet())return;this.loading=!0;const e={method:this.isEditMode?"OAuth2.updateClient":"OAuth2.createClient",name:this.form.name.trim(),description:this.form.description,type:this.form.type,grantTypes:this.form.grant_types,scope:this.form.scope,redirectUris:this.form.redirect_uris,active:this.form.active?"1":"0"};this.isEditMode&&(e.clientId=this.clientId),r["AjaxHelper"].fetch(e).then(e=>{this.visibleSecret=e.secret||"";const t=r["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=e.secret?this.translate("OAuth2_ClientSecretHelp"):"",l=[i,n].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e.client.client_id})),setTimeout(()=>{this.showNotification(`${l}`,"success","transient")},50)}).finally(()=>{this.loading=!1})},checkRequiredFieldsAreSet(){let e=!0,t="";return this.form.name.trim()?this.form.type.trim()?this.form.grant_types.length?this.form.scope.trim()?!this.form.redirect_uris.trim()&&this.form.grant_types.includes("authorization_code")&&(e=!1,t=this.translate("OAuth2_AdminRedirectUris")):(e=!1,t=this.translate("OAuth2_AdminScope")):(e=!1,t=this.translate("OAuth2_AdminClientGrants")):(e=!1,t=this.translate("OAuth2_AdminType")):(e=!1,t=this.translate("OAuth2_AdminName")),!e&&t&&this.showErrorFieldNotProvidedNotification(t),e},removeNotifications(){r["NotificationsStore"].remove(se),r["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:se,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("d8e2");me.render=ae,me.__scopeId="data-v-663d8135";var ue=me,he=Object(o["defineComponent"])({name:"Oauth2AdminApp",props:{initialClients:{type:Array,required:!0},scopes:{type:Object,required:!0}},components:{Oauth2ClientList:M,Oauth2ClientEdit:ue},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(o["watch"])(()=>r["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(r["MatomoUrl"].hashParsed.value.idClient)},methods:{initState(e){e?this.secretClientId&&this.secretClientId!==e&&(this.secret="",this.secretClientId=""):(this.secret="",this.secretClientId=""),this.editedClientId=e||""},createClient(){r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},r["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",r["MatomoUrl"].updateHash(e)},onClientSaved(e){const t=this.clients.findIndex(t=>t.client_id===e.client.client_id);-1===t?this.clients.push(e.client):this.clients.splice(t,1,e.client),this.clients=[...this.clients].sort((e,t)=>{const i=e.updated_at?new Date(e.updated_at).getTime():0,n=t.updated_at?new Date(t.updated_at).getTime():0;return n!==i?n-i:e.name.localeCompare(t.name)}),this.secret=e.secret||"",this.secretClientId=e.secret?e.client.client_id:""},onClientDeleted(e){this.secret="",this.secretClientId===e&&(this.secretClientId=""),this.clients=this.clients.filter(t=>t.client_id!==e)},onClientUpdated(e){const t=this.clients.findIndex(t=>t.client_id===e.client_id);-1!==t&&(this.clients.splice(t,1,e),this.clients=[...this.clients])}},computed:{isEditMode(){return!!this.editedClientId}}});he.render=a;var pe=he; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["OAuth2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["OAuth2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,i){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/OAuth2/vue/dist/",i(i.s="fae3")}({"05ab":function(e,t,i){"use strict";i("5e25")},"19dc":function(t,i){t.exports=e},"5e25":function(e,t,i){},"8bbf":function(e,i){e.exports=t},9601:function(e,t,i){"use strict";i("cd6a")},a5a2:function(e,t){e.exports=i},cd6a:function(e,t,i){},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return pe})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(i.p=l[1])}var o=i("8bbf");const c={class:"oauth2-admin"};function a(e,t,i,n,l,a){const r=Object(o["resolveComponent"])("Oauth2ClientList"),s=Object(o["resolveComponent"])("Oauth2ClientEdit");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:1,"client-id":e.editedClientId,scopes:e.scopes,"initial-secret":e.secret,onCancel:e.showList,onSaved:e.onClientSaved},null,8,["client-id","scopes","initial-secret","onCancel","onSaved"])):(Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:0,clients:e.clients,onCreate:e.createClient,onEdit:e.editClient,onDeleted:e.onClientDeleted,onUpdated:e.onClientUpdated},null,8,["clients","onCreate","onEdit","onDeleted","onUpdated"]))])}var r=i("19dc");const s=e=>(Object(o["pushScopeId"])("data-v-4e1cf580"),e=e(),Object(o["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},m={class:"ui-confirm",ref:"confirmDeleteClient"},u=["value"],h=["value"],p={class:"ui-confirm",ref:"confirmToggleClient"},O=["value"],b=["value"],f={style:{width:"180px"}},j={key:0},A=["title"],y={class:"client-id-code"},_={class:"redirect-uri"},v={class:"created-at"},C=["onClick","title"],g=["onClick","title"],N=["onClick","title"],E={key:1},S={colspan:"8"},V={class:"tableActionBar"},k=s(()=>Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1));function B(e,t,i,n,l,c){const a=Object(o["resolveComponent"])("ContentBlock"),r=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",d,[Object(o["createElementVNode"])("div",m,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmDeleteLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,u),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,h)],512),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmToggleLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,O),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,b)],512),Object(o["createVNode"])(a,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientsDescriptions")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(o["createElementVNode"])("th",f,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",j,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.clients,t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.client_id},[Object(o["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(o["toDisplayString"])(t.name),9,A),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.typeOptions[t.type]),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])((t.grant_types||[]).join(", ")),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("code",y,Object(o["toDisplayString"])(t.client_id),1)]),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.redirect_uris||[],e=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:e},[Object(o["createElementVNode"])("code",_,Object(o["toDisplayString"])(e),1)]))),128))]),Object(o["createElementVNode"])("td",v,Object(o["toDisplayString"])(t.created_at),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("button",{class:Object(o["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(o["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,C),Object(o["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(o["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,g),Object(o["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(o["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,N)])]))),128))])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",E,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",S,Object(o["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[r]]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("a",{class:"createNewClient",onClick:t[0]||(t[0]=Object(o["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[k,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}const D="oauth2clientlist";var w=Object(o["defineComponent"])({name:"Oauth2ClientList",props:{clients:{type:Array,required:!0}},emits:["create","edit","deleted","updated"],components:{ContentBlock:r["ContentBlock"]},directives:{ContentTable:r["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",typeOptions:{confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")}}},methods:{showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:D,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){r["NotificationsStore"].remove(D),r["NotificationsStore"].remove("ajaxHelper")},toggleClientStatus(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.setClientActive",clientId:e.client_id,active:e.active?"0":"1"}).then(e=>{if(null!==e&&void 0!==e&&e.client){this.removeNotifications();const t=r["Matomo"].helper.htmlEntities(e.client.name||e.client.client_id);this.showNotification(e.client.active?this.translate("OAuth2_AdminResumed",t):this.translate("OAuth2_AdminPaused",t),"success"),this.$emit("updated",e.client)}})}})},deleteClient(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:e.client_id}).then(i=>{null!==i&&void 0!==i&&i.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",t),"success"),this.$emit("deleted",e.client_id))})}})}}});i("05ab");w.render=B,w.__scopeId="data-v-4e1cf580";var M=w;const I=e=>(Object(o["pushScopeId"])("data-v-ba4724a2"),e=e(),Object(o["popScopeId"])(),e),T={class:"oauth2-admin oauth2-admin-edit"},x={class:"ui-confirm",ref:"confirmRotateClient"},H=["value"],P=["value"],U={key:0},L={class:"loadingPiwik"},R=I(()=>Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),G={class:"row"},$={class:"row"},q={key:0,class:"row"},F={key:1,class:"row oauth2-secret-head"},z={class:"col s12"},Y={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},X={class:"col s12 m6"},J={class:"copy-secret-wrapper-div"},K={key:0,class:"client-secret-code"},Q={key:1,class:"client-secret-code"},W={class:"col s12 m6"},Z=["innerHTML"],ee={class:"row",name:"type"},te={class:"row",name:"grantType"},ie={class:"row",name:"scopes"},ne={class:"row"},le={class:"row"},oe=["disabled"],ce={class:"entityCancel"};function ae(e,t,i,n,l,c){const a=Object(o["resolveComponent"])("Field"),r=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmRotateLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,H),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,P)],512),Object(o["createVNode"])(r,{"content-title":e.contentTitle},{default:Object(o["withCtx"])(()=>[e.loading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",U,[Object(o["createElementVNode"])("span",L,[R,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:1,onSubmit:t[8]||(t[8]=Object(o["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(o["createElementVNode"])("div",G,[Object(o["createVNode"])(a,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",$,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.description=t),rows:1,"ui-control-attributes":{style:"min-height: auto;"},"inline-help":e.translate("OAuth2_AdminDescriptionHelp"),title:e.translate("OAuth2_AdminDescription"),placeholder:e.translate("OAuth2_AdminDescriptionPlaceholder")},null,8,["modelValue","inline-help","title","placeholder"])]),e.isEditMode?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createVNode"])(a,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",F,[Object(o["createElementVNode"])("label",z,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,onClick:t[2]||(t[2]=Object(o["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(o["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Y,[Object(o["createElementVNode"])("div",X,[Object(o["createElementVNode"])("div",J,[e.visibleSecret?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",K,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.displayedSecret),1)])),[[s,{}]]):(Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",Q,Object(o["toDisplayString"])(e.displayedSecret),1))])]),Object(o["createElementVNode"])("div",W,[Object(o["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,Z)])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ee,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:1,uicontrol:"text",name:"type","model-value":e.typeOptions[e.form.type]||e.form.type,title:e.translate("OAuth2_AdminType"),disabled:!0},null,8,["model-value","title"])):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.type=t),title:e.translate("OAuth2_AdminType"),"inline-help":e.translate("OAuth2_AdminTypeHelp","",""),options:e.typeOptions},null,8,["modelValue","title","inline-help","options"]))]),Object(o["createElementVNode"])("div",te,[Object(o["createVNode"])(a,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.grant_types=t),"inline-help":e.translate("OAuth2_AdminGrantTypesHelp"),title:e.translate("OAuth2_AdminClientGrants")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ie,[Object(o["createVNode"])(a,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ne,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.redirect_uris=t),placeholder:"https://example.com/callback","inline-help":e.translate("OAuth2_AdminRedirectUrisHelp"),title:e.translate("OAuth2_AdminRedirectUris")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",le,[Object(o["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(o["toDisplayString"])(e.submitLabel),9,oe)]),Object(o["createElementVNode"])("div",ce,[Object(o["createElementVNode"])("a",{onClick:t[7]||(t[7]=Object(o["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}var re=i("a5a2");const se="oauth2clientedit";function de(e){const t=Object.keys(e||{})[0]||"";return{name:"",description:"",type:"confidential",grant_types:["authorization_code","client_credentials","refresh_token"],scope:t,redirect_uris:"",active:!0}}var me=Object(o["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:r["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:r["ContentBlock"],Field:re["Field"]},data(){const e={confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},t={authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")};return{loading:!1,confirmRotateLabel:"",typeOptions:e,grantOptions:t,form:de(this.scopes),visibleSecret:this.initialSecret}},created(){this.init()},watch:{clientId(){this.init()},initialSecret(e){this.visibleSecret=e},"form.type":"onFormTypeChange"},computed:{isEditMode(){return"0"!==this.clientId},contentTitle(){return this.isEditMode?this.translate("OAuth2_AdminEditTitle"):this.translate("OAuth2_AdminCreateTitle")},submitLabel(){return this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminSave")},visibleGrantOptions(){if("public"===this.form.type){const e={};return this.grantOptions.authorization_code&&(e.authorization_code=this.grantOptions.authorization_code),this.grantOptions.refresh_token&&(e.refresh_token=this.grantOptions.refresh_token),e}return this.grantOptions},showSecretPanel(){return"confidential"===this.form.type&&(this.isEditMode||!!this.visibleSecret)},canRegenerateSecret(){return this.isEditMode&&"confidential"===this.form.type},displayedSecret(){return this.visibleSecret||"*************"},secretInlineHelp(){return this.visibleSecret?this.translate("OAuth2_ClientSecretVisibleHelp"):this.translate("OAuth2_ClientSecretMaskedHelp")}},methods:{init(){this.removeNotifications(),this.form=de(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.getClient",clientId:this.clientId}).then(e=>{this.form={name:e.name||"",description:e.description||"",type:e.type||"confidential",grant_types:e.grant_types||[],scope:e.scopes&&e.scopes[0]||Object.keys(this.scopes||{})[0]||"",redirect_uris:(e.redirect_uris||[]).join("\n"),active:!!e.active}}).finally(()=>{this.loading=!1}))},onFormTypeChange(e){"public"===e&&this.form.grant_types.includes("client_credentials")&&(this.form.grant_types=this.form.grant_types.filter(e=>"client_credentials"!==e)),"public"===e&&(this.visibleSecret="")},rotateSecret(){this.canRegenerateSecret&&(this.confirmRotateLabel=this.translate("OAuth2_AdminRotateConfirm",this.form.name||this.clientId),r["Matomo"].helper.modalConfirm(this.$refs.confirmRotateClient,{yes:()=>{this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=this.translate("OAuth2_AdminRotatedNotification");this.showNotification(`${t}`,"success","transient")}}).finally(()=>{this.loading=!1})}}))},submit(){if(this.removeNotifications(),!this.checkRequiredFieldsAreSet())return;this.loading=!0;const e={method:this.isEditMode?"OAuth2.updateClient":"OAuth2.createClient",name:this.form.name.trim(),description:this.form.description,type:this.form.type,grantTypes:this.form.grant_types,scope:this.form.scope,redirectUris:this.form.redirect_uris,active:this.form.active?"1":"0"};this.isEditMode&&(e.clientId=this.clientId),r["AjaxHelper"].fetch(e).then(e=>{this.visibleSecret=e.secret||"";const t=r["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=e.secret?this.translate("OAuth2_ClientSecretHelp"):"",l=[i,n].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e.client.client_id})),setTimeout(()=>{this.showNotification(`${l}`,"success","transient")},50)}).finally(()=>{this.loading=!1})},checkRequiredFieldsAreSet(){let e=!0,t="";return this.form.name.trim()?this.form.type.trim()?this.form.grant_types.length?this.form.scope.trim()?!this.form.redirect_uris.trim()&&this.form.grant_types.includes("authorization_code")&&(e=!1,t=this.translate("OAuth2_AdminRedirectUris")):(e=!1,t=this.translate("OAuth2_AdminScope")):(e=!1,t=this.translate("OAuth2_AdminClientGrants")):(e=!1,t=this.translate("OAuth2_AdminType")):(e=!1,t=this.translate("OAuth2_AdminName")),!e&&t&&this.showErrorFieldNotProvidedNotification(t),e},removeNotifications(){r["NotificationsStore"].remove(se),r["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:se,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("9601");me.render=ae,me.__scopeId="data-v-ba4724a2";var ue=me,he=Object(o["defineComponent"])({name:"Oauth2AdminApp",props:{initialClients:{type:Array,required:!0},scopes:{type:Object,required:!0}},components:{Oauth2ClientList:M,Oauth2ClientEdit:ue},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(o["watch"])(()=>r["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(r["MatomoUrl"].hashParsed.value.idClient)},methods:{initState(e){e?this.secretClientId&&this.secretClientId!==e&&(this.secret="",this.secretClientId=""):(this.secret="",this.secretClientId=""),this.editedClientId=e||""},createClient(){r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},r["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",r["MatomoUrl"].updateHash(e)},onClientSaved(e){const t=this.clients.findIndex(t=>t.client_id===e.client.client_id);-1===t?this.clients.push(e.client):this.clients.splice(t,1,e.client),this.clients=[...this.clients].sort((e,t)=>{const i=e.updated_at?new Date(e.updated_at).getTime():0,n=t.updated_at?new Date(t.updated_at).getTime():0;return n!==i?n-i:e.name.localeCompare(t.name)}),this.secret=e.secret||"",this.secretClientId=e.secret?e.client.client_id:""},onClientDeleted(e){this.secret="",this.secretClientId===e&&(this.secretClientId=""),this.clients=this.clients.filter(t=>t.client_id!==e)},onClientUpdated(e){const t=this.clients.findIndex(t=>t.client_id===e.client_id);-1!==t&&(this.clients.splice(t,1,e),this.clients=[...this.clients])}},computed:{isEditMode(){return!!this.editedClientId}}});he.render=a;var pe=he; /*! * Matomo - free/libre analytics platform * diff --git a/vue/dist/OAuth2.umd.min.js.map b/vue/dist/OAuth2.umd.min.js.map index 3ff6e9a..aee7209 100644 --- a/vue/dist/OAuth2.umd.min.js.map +++ b/vue/dist/OAuth2.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?542c","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?7582","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__19dc__","__WEBPACK_EXTERNAL_MODULE__8bbf__","__WEBPACK_EXTERNAL_MODULE_a5a2__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","class","isEditMode","client-id","editedClientId","scopes","initial-secret","secret","showList","onClientSaved","clients","createClient","editClient","onClientDeleted","onClientUpdated","ref","style","colspan","confirmDeleteLabel","role","type","translate","confirmToggleLabel","content-title","feature","length","client","client_id","title","$sanitize","description","typeOptions","grant_types","join","active","redirect_uris","uri","created_at","toggleClientStatus","$emit","deleteClient","notificationId","props","Array","required","emits","components","ContentBlock","directives","ContentTable","confidential","public","methods","message","context","instanceId","show","id","setTimeout","scrollToNotification","remove","safeClientName","helper","htmlEntities","modalConfirm","$refs","confirmToggleClient","yes","fetch","method","clientId","then","response","removeNotifications","safeUpdatedClientName","showNotification","confirmDeleteClient","deleted","render","__scopeId","confirmRotateLabel","contentTitle","loading","submit","uicontrol","form","inline-help","rows","ui-control-attributes","placeholder","model-value","disabled","showSecretPanel","canRegenerateSecret","rotateSecret","visibleSecret","displayedSecret","secretInlineHelp","options","visibleGrantOptions","var-type","scope","submitLabel","getDefaultForm","firstScope","keys","String","initialSecret","default","CopyToClipboard","Field","grantOptions","authorization_code","client_credentials","refresh_token","init","watch","newSecret","computed","filtered","finally","newType","includes","filter","confirmRotateClient","rotatedMessage","secretMessage","Boolean","checkRequiredFieldsAreSet","params","trim","grantTypes","redirectUris","clientMessage","updateHash","hashParsed","idClient","errorMessage","showErrorFieldNotProvidedNotification","notificationInstanceId","initialClients","Oauth2ClientList","Oauth2ClientEdit","secretClientId","initState","payload","index","findIndex","push","splice","sort","left","right","leftTime","updated_at","Date","getTime","rightTime","localeCompare","updatedClient"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAC7C,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,WAAY,CAAE,oBAAqBJ,GACjB,kBAAZC,QACdA,QAAQ,UAAYD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAEzEJ,EAAK,UAAYC,EAAQD,EAAK,YAAaA,EAAK,OAAQA,EAAK,sBAR/D,CASoB,qBAATO,KAAuBA,KAAOC,MAAO,SAASC,EAAmCC,EAAmCC,GAC/H,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUZ,QAGnC,IAAIC,EAASS,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHd,QAAS,IAUV,OANAe,EAAQH,GAAUI,KAAKf,EAAOD,QAASC,EAAQA,EAAOD,QAASW,GAG/DV,EAAOa,GAAI,EAGJb,E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AK0L,eAAiB,IAExB1L,KAAKqD,QAAUrD,KAAKqD,QAAQiH,OAAQjG,GAAWA,EAAOC,YAAc2C,IAEtE,gBAAgByF,GACd,MAAMb,EAAQ7L,KAAKqD,QAAQyI,UACxBzH,GAAWA,EAAOC,YAAcoI,EAAcpI,YAElC,IAAXuH,IAIJ7L,KAAKqD,QAAQ2I,OAAOH,EAAO,EAAGa,GAC9B1M,KAAKqD,QAAU,IAAIrD,KAAKqD,YAG5B4G,SAAU,CACR,aACE,QAASjK,KAAK+C,mBCvHpB,GAAO0E,OAASA,EAED","file":"OAuth2.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=663d8135&scoped=true&lang=css\"","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n };\n },\n methods: {\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const instanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n\n setTimeout(() => {\n NotificationsStore.scrollToNotification(instanceId);\n }, 200);\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n toggleClientStatus(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmToggleLabel = client.active\n ? this.translate('OAuth2_AdminPauseConfirm', safeClientName)\n : this.translate('OAuth2_AdminResumeConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmToggleClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.setClientActive',\n clientId: client.client_id,\n active: client.active ? '0' : '1',\n }).then((response) => {\n if (response?.client) {\n this.removeNotifications();\n const safeUpdatedClientName = Matomo.helper.htmlEntities(\n response.client.name || response.client.client_id,\n );\n this.showNotification(\n response.client.active\n ? this.translate('OAuth2_AdminResumed', safeUpdatedClientName)\n : this.translate('OAuth2_AdminPaused', safeUpdatedClientName),\n 'success',\n );\n this.$emit('updated', response.client);\n }\n });\n },\n });\n },\n deleteClient(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmDeleteLabel = this.translate('OAuth2_AdminDeleteConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","import { render } from \"./List.vue?vue&type=template&id=4e1cf580&scoped=true\"\nimport script from \"./List.vue?vue&type=script&lang=ts\"\nexport * from \"./List.vue?vue&type=script&lang=ts\"\n\nimport \"./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-4e1cf580\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const safeClientName = Matomo.helper.htmlEntities(this.form.name || this.clientId);\n const rotatedMessage = this.translate('OAuth2_AdminRotated', safeClientName);\n const secretMessage = this.translate('OAuth2_ClientSecretHelp');\n const message = [rotatedMessage, secretMessage].filter(Boolean).join(' ');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","import { render } from \"./Edit.vue?vue&type=template&id=663d8135&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=663d8135&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-663d8135\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","import { render } from \"./Manage.vue?vue&type=template&id=f7d6db3a\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?542c","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__19dc__","__WEBPACK_EXTERNAL_MODULE__8bbf__","__WEBPACK_EXTERNAL_MODULE_a5a2__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","class","isEditMode","client-id","editedClientId","scopes","initial-secret","secret","showList","onClientSaved","clients","createClient","editClient","onClientDeleted","onClientUpdated","ref","style","colspan","confirmDeleteLabel","role","type","translate","confirmToggleLabel","content-title","feature","length","client","client_id","title","$sanitize","description","typeOptions","grant_types","join","active","redirect_uris","uri","created_at","toggleClientStatus","$emit","deleteClient","notificationId","props","Array","required","emits","components","ContentBlock","directives","ContentTable","confidential","public","methods","message","context","instanceId","show","id","setTimeout","scrollToNotification","remove","safeClientName","helper","htmlEntities","modalConfirm","$refs","confirmToggleClient","yes","fetch","method","clientId","then","response","removeNotifications","safeUpdatedClientName","showNotification","confirmDeleteClient","deleted","render","__scopeId","confirmRotateLabel","contentTitle","loading","submit","uicontrol","form","inline-help","rows","ui-control-attributes","placeholder","model-value","disabled","showSecretPanel","canRegenerateSecret","rotateSecret","visibleSecret","displayedSecret","secretInlineHelp","options","visibleGrantOptions","var-type","scope","submitLabel","getDefaultForm","firstScope","keys","String","initialSecret","default","CopyToClipboard","Field","grantOptions","authorization_code","client_credentials","refresh_token","init","watch","newSecret","computed","filtered","finally","newType","includes","filter","confirmRotateClient","checkRequiredFieldsAreSet","params","trim","grantTypes","redirectUris","clientMessage","secretMessage","Boolean","updateHash","hashParsed","idClient","errorMessage","showErrorFieldNotProvidedNotification","notificationInstanceId","initialClients","Oauth2ClientList","Oauth2ClientEdit","secretClientId","initState","payload","index","findIndex","push","splice","sort","left","right","leftTime","updated_at","Date","getTime","rightTime","localeCompare","updatedClient"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAC7C,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,WAAY,CAAE,oBAAqBJ,GACjB,kBAAZC,QACdA,QAAQ,UAAYD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAEzEJ,EAAK,UAAYC,EAAQD,EAAK,YAAaA,EAAK,OAAQA,EAAK,sBAR/D,CASoB,qBAATO,KAAuBA,KAAOC,MAAO,SAASC,EAAmCC,EAAmCC,GAC/H,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUZ,QAGnC,IAAIC,EAASS,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHd,QAAS,IAUV,OANAe,EAAQH,GAAUI,KAAKf,EAAOD,QAASC,EAAQA,EAAOD,QAASW,GAG/DV,EAAOa,GAAI,EAGJb,EAAOD,QA0Df,OArDAW,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASnB,EAASoB,EAAMC,GAC3CV,EAAoBW,EAAEtB,EAASoB,IAClCG,OAAOC,eAAexB,EAASoB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAS3B,GACX,qBAAX4B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exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n };\n },\n methods: {\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const instanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n\n setTimeout(() => {\n NotificationsStore.scrollToNotification(instanceId);\n }, 200);\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n toggleClientStatus(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmToggleLabel = client.active\n ? this.translate('OAuth2_AdminPauseConfirm', safeClientName)\n : this.translate('OAuth2_AdminResumeConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmToggleClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.setClientActive',\n clientId: client.client_id,\n active: client.active ? '0' : '1',\n }).then((response) => {\n if (response?.client) {\n this.removeNotifications();\n const safeUpdatedClientName = Matomo.helper.htmlEntities(\n response.client.name || response.client.client_id,\n );\n this.showNotification(\n response.client.active\n ? this.translate('OAuth2_AdminResumed', safeUpdatedClientName)\n : this.translate('OAuth2_AdminPaused', safeUpdatedClientName),\n 'success',\n );\n this.$emit('updated', response.client);\n }\n });\n },\n });\n },\n deleteClient(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmDeleteLabel = this.translate('OAuth2_AdminDeleteConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","import { render } from \"./List.vue?vue&type=template&id=4e1cf580&scoped=true\"\nimport script from \"./List.vue?vue&type=script&lang=ts\"\nexport * from \"./List.vue?vue&type=script&lang=ts\"\n\nimport \"./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-4e1cf580\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","import { render } from \"./Manage.vue?vue&type=template&id=f7d6db3a\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script"],"sourceRoot":""} \ No newline at end of file diff --git a/vue/src/OAuthClients/Edit.vue b/vue/src/OAuthClients/Edit.vue index 6e8e36c..239b740 100644 --- a/vue/src/OAuthClients/Edit.vue +++ b/vue/src/OAuthClients/Edit.vue @@ -367,10 +367,7 @@ export default defineComponent({ }).then((response) => { if (response?.secret) { this.visibleSecret = response.secret; - const safeClientName = Matomo.helper.htmlEntities(this.form.name || this.clientId); - const rotatedMessage = this.translate('OAuth2_AdminRotated', safeClientName); - const secretMessage = this.translate('OAuth2_ClientSecretHelp'); - const message = [rotatedMessage, secretMessage].filter(Boolean).join(' '); + const message = this.translate('OAuth2_AdminRotatedNotification'); this.showNotification(`${message}`, 'success', 'transient'); } }).finally(() => {