diff --git a/CHANGELOG.md b/CHANGELOG.md index b9e4992..cede501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +5.2.4 - 2026-07-27 +- Added code to warn users if scope is downgraded + 5.2.3 - 2026-07-20 - Added code to harden check and disallow update user action diff --git a/OAuth2.php b/OAuth2.php index 0713eb0..68cd1a5 100644 --- a/OAuth2.php +++ b/OAuth2.php @@ -187,6 +187,7 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'OAuth2_AdminTypeHelp'; $translationKeys[] = 'OAuth2_AdminGrantTypesHelp'; $translationKeys[] = 'OAuth2_AdminScopeHelp'; + $translationKeys[] = 'OAuth2_AdminScopeReducedWarning'; $translationKeys[] = 'OAuth2_AdminRedirectUrisHelp'; $translationKeys[] = 'OAuth2_AdminActiveHelp'; $translationKeys[] = 'OAuth2_ErrorXNotProvided'; diff --git a/lang/en.json b/lang/en.json index 0965a01..50d988b 100644 --- a/lang/en.json +++ b/lang/en.json @@ -44,6 +44,7 @@ "AdminScope": "Allowed scope", "AdminScopes": "Allowed scopes", "AdminScopeHelp": "Scope defines the maximum access level granted to the OAuth token. For example, if the %1$sadmin%2$s scope is used, the token will have admin-level access at most, even if the authenticated user is a superuser.", + "AdminScopeReducedWarning": "You reduced the allowed scope, but access tokens already issued keep their previous scope until they expire. To restrict existing access immediately, Pause the client.", "AdminRedirectUris": "Redirect URIs (one per line)", "AdminRedirectUrisHelp": "Allowed redirect or callback URIs for the authorisation code flow (one per line, must match exactly).", "AdminActiveLabel": "Active", diff --git a/plugin.json b/plugin.json index 0f2b23b..85febd3 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "OAuth2", "description": "Provide secure access to the Matomo API using scoped permissions. No static credentials.", - "version": "5.2.3", + "version": "5.2.4", "theme": false, "require": { "php": ">=8.1.0", diff --git a/tests/UI/OAuth2_spec.js b/tests/UI/OAuth2_spec.js index 843c748..c37dbb8 100644 --- a/tests/UI/OAuth2_spec.js +++ b/tests/UI/OAuth2_spec.js @@ -97,7 +97,7 @@ describe("OAuth2Admin", function () { await testEnvironment.save(); } - async function fillClientForm(name, typeTitle, redirectUri) + async function fillClientForm(name, typeTitle, redirectUri, scopeTitle = 'Matomo read level access') { await page.evaluate(function (name) { $('#name').val(name).change(); @@ -110,7 +110,7 @@ describe("OAuth2Admin", function () { await selectValue(page, 'div[name="type"]', typeTitle); } - await selectValue(page,'div[name="scopes"]', 'Matomo read level access.'); + await selectValue(page,'div[name="scopes"]', scopeTitle); await page.evaluate(function (redirectUri) { const redirectField = document.querySelector('#redirect_uris'); @@ -204,4 +204,37 @@ describe("OAuth2Admin", function () { }); await capturePage('secret_not_shown_again'); }); + + it('should warn when an existing client scope is reduced', async function () { + // Create a client with admin scope, then reduce it to read on edit. + await page.goto(createUrl); + await fillClientForm('Scope narrowing client', 'Confidential', 'https://narrow.example/callback', 'Matomo admin level access'); + await submitForm(true); + + await page.goto(adminUrl); + await editFirstClient(); + await selectValue(page, 'div[name="scopes"]', 'Matomo read level access'); + await submitForm(); + + await page.waitForSelector('#notificationContainer .notification-warning', { visible: true }); + const warningText = await page.$eval('#notificationContainer .notification-warning', (el) => el.innerText); + + expect(warningText).to.contain('reduced the allowed scope'); + }); + + it('should not warn when an existing client scope is not reduced', async function () { + // Editing without lowering the scope must not raise the warning. + await page.goto(createUrl); + await fillClientForm('Scope unchanged client', 'Confidential', 'https://unchanged.example/callback', 'Matomo read level access'); + await submitForm(true); + + await page.goto(adminUrl); + await editFirstClient(); + await page.evaluate(function () { + $('#name').val('Scope unchanged client renamed').change(); + }); + await submitForm(); + + expect(await page.$('#notificationContainer .notification-warning')).to.be.null; + }); }); diff --git a/vue/dist/OAuth2.css b/vue/dist/OAuth2.css index 080bdd1..778313d 100644 --- a/vue/dist/OAuth2.css +++ b/vue/dist/OAuth2.css @@ -1 +1 @@ -.client-id-code[data-v-19ab60c1]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-19ab60c1]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-9f0c0e34]{margin-bottom:0}.client-secret-code[data-v-9f0c0e34]{word-break:break-word;white-space:pre-wrap;overflow-wrap:anywhere;margin:0} \ No newline at end of file +.client-id-code[data-v-19ab60c1]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-19ab60c1]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-02b0c366]{margin-bottom:0}.client-secret-code[data-v-02b0c366]{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 f53f50f..4c31e8a 100644 --- a/vue/dist/OAuth2.umd.js +++ b/vue/dist/OAuth2.umd.js @@ -110,12 +110,19 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__; /***/ }), -/***/ "563e": +/***/ "6c4a": +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ "7a8a": /***/ (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_9f0c0e34_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a1c5"); -/* 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_9f0c0e34_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_9f0c0e34_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); +/* 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_02b0c366_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6c4a"); +/* 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_02b0c366_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_02b0c366_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); /* unused harmony reexport * */ @@ -128,13 +135,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; /***/ }), -/***/ "a1c5": -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin - -/***/ }), - /***/ "a5a2": /***/ (function(module, exports) { @@ -479,65 +479,65 @@ Listvue_type_script_lang_ts.render = Listvue_type_template_id_19ab60c1_scoped_tr Listvue_type_script_lang_ts.__scopeId = "data-v-19ab60c1" /* 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=9f0c0e34&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=02b0c366&scoped=true -const Editvue_type_template_id_9f0c0e34_scoped_true_withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-9f0c0e34"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_1 = { +const Editvue_type_template_id_02b0c366_scoped_true_withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-02b0c366"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_1 = { class: "oauth2-admin oauth2-admin-edit" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_2 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_2 = { key: 0 }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_3 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_3 = { class: "loadingPiwik" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_4 = /*#__PURE__*/Editvue_type_template_id_9f0c0e34_scoped_true_withScopeId(() => /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_4 = /*#__PURE__*/Editvue_type_template_id_02b0c366_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_9f0c0e34_scoped_true_hoisted_5 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_5 = { class: "row" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_6 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_6 = { class: "row" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_7 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_7 = { key: 0, class: "row" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_8 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_8 = { key: 1, class: "row oauth2-secret-head" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_9 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_9 = { class: "col s12" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_10 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_10 = { key: 2, class: "oauth2-secret-div form-group row matomo-form-field" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_11 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_11 = { class: "col s12 m6" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_12 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_12 = { class: "copy-secret-wrapper-div" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_13 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_13 = { key: 0, class: "client-secret-code" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_14 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_14 = { key: 1, class: "client-secret-code" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_15 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_15 = { class: "col s12 m6" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_16 = ["innerHTML"]; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_17 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_16 = ["innerHTML"]; +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_17 = { class: "row", name: "type" }; -const Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_18 = { +const Editvue_type_template_id_02b0c366_scoped_true_hoisted_18 = { class: "row", name: "grantType" }; @@ -555,29 +555,29 @@ const _hoisted_22 = ["disabled"]; const _hoisted_23 = { class: "entityCancel" }; -function Editvue_type_template_id_9f0c0e34_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { +function Editvue_type_template_id_02b0c366_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_PasswordConfirmation = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PasswordConfirmation"); 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_9f0c0e34_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PasswordConfirmation, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_02b0c366_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PasswordConfirmation, { modelValue: _ctx.showPasswordConfirmModal, "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.showPasswordConfirmModal = $event), onConfirmed: _ctx.onPasswordConfirmed }, null, 8, ["modelValue", "onConfirmed"]), 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_9f0c0e34_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_3, [Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_4, 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_02b0c366_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_02b0c366_scoped_true_hoisted_3, [Editvue_type_template_id_02b0c366_scoped_true_hoisted_4, 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[9] || (_cache[9] = 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_9f0c0e34_scoped_true_hoisted_5, [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_02b0c366_scoped_true_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "name", modelValue: _ctx.form.name, "onUpdate:modelValue": _cache[1] || (_cache[1] = $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_9f0c0e34_scoped_true_hoisted_6, [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_02b0c366_scoped_true_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "textarea", name: "description", modelValue: _ctx.form.description, @@ -589,19 +589,19 @@ function Editvue_type_template_id_9f0c0e34_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_9f0c0e34_scoped_true_hoisted_7, [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_02b0c366_scoped_true_hoisted_7, [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_9f0c0e34_scoped_true_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_9, [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_02b0c366_scoped_true_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", Editvue_type_template_id_02b0c366_scoped_true_hoisted_9, [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[3] || (_cache[3] = 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_9f0c0e34_scoped_true_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_12, [_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_9f0c0e34_scoped_true_hoisted_13, [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_9f0c0e34_scoped_true_hoisted_14, 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_9f0c0e34_scoped_true_hoisted_15, [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_02b0c366_scoped_true_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_02b0c366_scoped_true_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_02b0c366_scoped_true_hoisted_12, [_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_02b0c366_scoped_true_hoisted_13, [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_02b0c366_scoped_true_hoisted_14, 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_02b0c366_scoped_true_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "form-help", innerHTML: _ctx.$sanitize(_ctx.secretInlineHelp) - }, null, 8, Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_16)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_17, [!_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_02b0c366_scoped_true_hoisted_16)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_02b0c366_scoped_true_hoisted_17, [!_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", @@ -617,7 +617,7 @@ function Editvue_type_template_id_9f0c0e34_scoped_true_render(_ctx, _cache, $pro "model-value": _ctx.typeOptions[_ctx.form.type] || _ctx.form.type, title: _ctx.translate('OAuth2_AdminType'), disabled: true - }, null, 8, ["model-value", "title"]))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_9f0c0e34_scoped_true_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["model-value", "title"]))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_02b0c366_scoped_true_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "checkbox", options: _ctx.visibleGrantOptions, "var-type": "array", @@ -652,7 +652,7 @@ function Editvue_type_template_id_9f0c0e34_scoped_true_render(_ctx, _cache, $pro _: 1 }, 8, ["content-title"])]); } -// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=9f0c0e34&scoped=true +// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=02b0c366&scoped=true // 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/Edit.vue?vue&type=script&lang=ts @@ -712,6 +712,7 @@ function getDefaultForm(scopes) { typeOptions, grantOptions, form: getDefaultForm(this.scopes), + originalScope: '', visibleSecret: this.initialSecret, showPasswordConfirmModal: false, passwordConfirmAction: '' @@ -790,6 +791,7 @@ function getDefaultForm(scopes) { redirect_uris: (client.redirect_uris || []).join('\n'), active: !!client.active }; + this.originalScope = this.form.scope; }).finally(() => { this.loading = false; }); @@ -848,8 +850,18 @@ function getDefaultForm(scopes) { this.loading = false; }); }, + scopeLevel(scope) { + const levels = { + 'matomo:read': 1, + 'matomo:write': 2, + 'matomo:admin': 3, + 'matomo:superuser': 4 + }; + return levels[scope] || 0; + }, saveClient(passwordConfirmation) { this.loading = true; + const scopeWasReduced = this.isEditMode && this.scopeLevel(this.form.scope) < this.scopeLevel(this.originalScope); const params = { method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient', name: this.form.name.trim(), @@ -881,8 +893,12 @@ function getDefaultForm(scopes) { external_CoreHome_["MatomoUrl"].updateHash(Object.assign(Object.assign({}, external_CoreHome_["MatomoUrl"].hashParsed.value), {}, { idClient: response.client.client_id })); + this.originalScope = this.form.scope; setTimeout(() => { this.showNotification(`${message}`, 'success', 'transient'); + if (scopeWasReduced) { + this.showNotification(this.translate('OAuth2_AdminScopeReducedWarning'), 'warning', 'persistent', `${Editvue_type_script_lang_ts_notificationId}scopereduced`); + } }, 50); }).finally(() => { this.loading = false; @@ -914,13 +930,14 @@ function getDefaultForm(scopes) { }, removeNotifications() { external_CoreHome_["NotificationsStore"].remove(Editvue_type_script_lang_ts_notificationId); + external_CoreHome_["NotificationsStore"].remove(`${Editvue_type_script_lang_ts_notificationId}scopereduced`); external_CoreHome_["NotificationsStore"].remove('ajaxHelper'); }, - showNotification(message, context, type = null) { + showNotification(message, context, type = null, id = Editvue_type_script_lang_ts_notificationId) { const notificationInstanceId = external_CoreHome_["NotificationsStore"].show({ message, context, - id: Editvue_type_script_lang_ts_notificationId, + id, type: type !== null ? type : 'toast' }); setTimeout(() => { @@ -935,8 +952,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=9f0c0e34&scoped=true&lang=css -var Editvue_type_style_index_0_id_9f0c0e34_scoped_true_lang_css = __webpack_require__("563e"); +// EXTERNAL MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=style&index=0&id=02b0c366&scoped=true&lang=css +var Editvue_type_style_index_0_id_02b0c366_scoped_true_lang_css = __webpack_require__("7a8a"); // CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue @@ -944,8 +961,8 @@ var Editvue_type_style_index_0_id_9f0c0e34_scoped_true_lang_css = __webpack_requ -Editvue_type_script_lang_ts.render = Editvue_type_template_id_9f0c0e34_scoped_true_render -Editvue_type_script_lang_ts.__scopeId = "data-v-9f0c0e34" +Editvue_type_script_lang_ts.render = Editvue_type_template_id_02b0c366_scoped_true_render +Editvue_type_script_lang_ts.__scopeId = "data-v-02b0c366" /* 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 a3baf56..c9d9021 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?6a1d","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?207c","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?c3e5","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?5fa3","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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AI,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;;ACrI6f,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","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","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=9f0c0e34&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","// extracted by mini-css-extract-plugin","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!./List.vue?vue&type=style&index=0&id=19ab60c1&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 { PasswordConfirmation } from 'CorePluginsAdmin';\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 scopes: {\n type: Object as PropType>,\n required: true,\n },\n authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n PasswordConfirmation,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n clientToDelete: null as Client|null,\n showDeleteConfirmModal: false,\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n grantTypeOptions: {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n } as Record,\n };\n },\n computed: {\n adminClientsDescription(): string {\n const authorizeUrl = `${this.authorizeUrl}`;\n const tokenUrl = `${this.tokenUrl}`;\n\n return `${this.translate('OAuth2_AdminClientsDescriptions')} ${this.translate('OAuth2_AdminClientDescriptionAdditionalHelpText', authorizeUrl, tokenUrl)}`;\n },\n },\n methods: {\n getShortScopeLabel(scope: string) {\n const shortScopeLabels = {\n 'matomo:read': this.translate('UsersManager_PrivView'),\n 'matomo:write': this.translate('UsersManager_PrivWrite'),\n 'matomo:admin': this.translate('UsersManager_PrivAdmin'),\n 'matomo:superuser': this.translate('OAuth2_ScopeSuperUserShort'),\n } as Record;\n\n return shortScopeLabels[scope] || this.scopes[scope] || scope;\n },\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 getScopeLabel(client: Client) {\n const scope = client.scopes?.[0];\n\n if (!scope) {\n return '';\n }\n\n return this.getShortScopeLabel(scope);\n },\n getGrantTypeLabel(grantType: string) {\n return this.grantTypeOptions[grantType] || grantType;\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 this.clientToDelete = client;\n this.showDeleteConfirmModal = true;\n },\n onDeleteConfirmed(passwordConfirmation: string) {\n this.showDeleteConfirmModal = false;\n const client = this.clientToDelete;\n this.clientToDelete = null;\n\n if (!client) {\n return;\n }\n\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n },\n {\n postParams: {\n passwordConfirmation,\n },\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","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=19ab60c1&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=19ab60c1&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-19ab60c1\"\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, PasswordConfirmation } 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 PasswordConfirmation,\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 showPasswordConfirmModal: false,\n passwordConfirmAction: '',\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 this.passwordConfirmAction = 'rotate';\n this.showPasswordConfirmModal = true;\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.confirmRotateLabel = this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminCreateTitle');\n this.passwordConfirmAction = 'save';\n this.showPasswordConfirmModal = true;\n },\n onPasswordConfirmed(passwordConfirmation: string) {\n this.showPasswordConfirmModal = false;\n if (this.passwordConfirmAction === 'rotate') {\n this.doRotateSecret(passwordConfirmation);\n } else if (this.passwordConfirmAction === 'save') {\n this.saveClient(passwordConfirmation);\n }\n this.passwordConfirmAction = '';\n },\n doRotateSecret(passwordConfirmation: string) {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n },\n {\n postParams: {\n passwordConfirmation,\n },\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const code = `${this.visibleSecret}`;\n const message = `${this.translate('OAuth2_AdminRotatedNotification')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`;\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n saveClient(passwordConfirmation: string) {\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, { postParams: { passwordConfirmation } }).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 code = `${this.visibleSecret}`;\n const secretMessage = response.secret\n ? `${this.translate('OAuth2_ClientSecretHelp')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`\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=9f0c0e34&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=9f0c0e34&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-9f0c0e34\"\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 authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\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=096198f6\"\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?6a1d","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?385b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?6556","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?5fa3","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,uC;;;;;;;ACAA,mD;;;;;;;ACAA,uC;;;;;;;;ACAA;AAAA;AAAA;;;;;;;;ACAA,mD;;;;;;;ACAA,kD;;;;;;;;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OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE;IACtE,CAAC;IACD,eAAe,CAAC,QAAgB;MAC9B,IAAI,CAAC,MAAM,GAAG,EAAE;MAChB,IAAI,IAAI,CAAC,cAAc,KAAK,QAAQ,EAAE;QACpC,IAAI,CAAC,cAAc,GAAG,EAAE;MACzB;MACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,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;;ACrI6f,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","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// 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=02b0c366&scoped=true&lang=css\"","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!./List.vue?vue&type=style&index=0&id=19ab60c1&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 { PasswordConfirmation } from 'CorePluginsAdmin';\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 scopes: {\n type: Object as PropType>,\n required: true,\n },\n authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n PasswordConfirmation,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n clientToDelete: null as Client|null,\n showDeleteConfirmModal: false,\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n grantTypeOptions: {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n } as Record,\n };\n },\n computed: {\n adminClientsDescription(): string {\n const authorizeUrl = `${this.authorizeUrl}`;\n const tokenUrl = `${this.tokenUrl}`;\n\n return `${this.translate('OAuth2_AdminClientsDescriptions')} ${this.translate('OAuth2_AdminClientDescriptionAdditionalHelpText', authorizeUrl, tokenUrl)}`;\n },\n },\n methods: {\n getShortScopeLabel(scope: string) {\n const shortScopeLabels = {\n 'matomo:read': this.translate('UsersManager_PrivView'),\n 'matomo:write': this.translate('UsersManager_PrivWrite'),\n 'matomo:admin': this.translate('UsersManager_PrivAdmin'),\n 'matomo:superuser': this.translate('OAuth2_ScopeSuperUserShort'),\n } as Record;\n\n return shortScopeLabels[scope] || this.scopes[scope] || scope;\n },\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 getScopeLabel(client: Client) {\n const scope = client.scopes?.[0];\n\n if (!scope) {\n return '';\n }\n\n return this.getShortScopeLabel(scope);\n },\n getGrantTypeLabel(grantType: string) {\n return this.grantTypeOptions[grantType] || grantType;\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 this.clientToDelete = client;\n this.showDeleteConfirmModal = true;\n },\n onDeleteConfirmed(passwordConfirmation: string) {\n this.showDeleteConfirmModal = false;\n const client = this.clientToDelete;\n this.clientToDelete = null;\n\n if (!client) {\n return;\n }\n\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n },\n {\n postParams: {\n passwordConfirmation,\n },\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","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=19ab60c1&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=19ab60c1&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-19ab60c1\"\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, PasswordConfirmation } 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 PasswordConfirmation,\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 originalScope: '',\n visibleSecret: this.initialSecret,\n showPasswordConfirmModal: false,\n passwordConfirmAction: '',\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 this.originalScope = this.form.scope;\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 this.passwordConfirmAction = 'rotate';\n this.showPasswordConfirmModal = true;\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.confirmRotateLabel = this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminCreateTitle');\n this.passwordConfirmAction = 'save';\n this.showPasswordConfirmModal = true;\n },\n onPasswordConfirmed(passwordConfirmation: string) {\n this.showPasswordConfirmModal = false;\n if (this.passwordConfirmAction === 'rotate') {\n this.doRotateSecret(passwordConfirmation);\n } else if (this.passwordConfirmAction === 'save') {\n this.saveClient(passwordConfirmation);\n }\n this.passwordConfirmAction = '';\n },\n doRotateSecret(passwordConfirmation: string) {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n },\n {\n postParams: {\n passwordConfirmation,\n },\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const code = `${this.visibleSecret}`;\n const message = `${this.translate('OAuth2_AdminRotatedNotification')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`;\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n scopeLevel(scope: string): number {\n const levels: Record = {\n 'matomo:read': 1,\n 'matomo:write': 2,\n 'matomo:admin': 3,\n 'matomo:superuser': 4,\n };\n\n return levels[scope] || 0;\n },\n saveClient(passwordConfirmation: string) {\n this.loading = true;\n const scopeWasReduced = this.isEditMode\n && this.scopeLevel(this.form.scope) < this.scopeLevel(this.originalScope);\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, { postParams: { passwordConfirmation } }).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 code = `${this.visibleSecret}`;\n const secretMessage = response.secret\n ? `${this.translate('OAuth2_ClientSecretHelp')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`\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 this.originalScope = this.form.scope;\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n if (scopeWasReduced) {\n this.showNotification(\n this.translate('OAuth2_AdminScopeReducedWarning'),\n 'warning',\n 'persistent',\n `${notificationId}scopereduced`,\n );\n }\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(`${notificationId}scopereduced`);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null, id: string = notificationId) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id,\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=02b0c366&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=02b0c366&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-02b0c366\"\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 authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\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=096198f6\"\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 79fc4b9..ac966db 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 o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.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 o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));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")}({"054d":function(e,t,i){},"19dc":function(t,i){t.exports=e},"563e":function(e,t,i){"use strict";i("a1c5")},"8bbf":function(e,i){e.exports=t},a1c5:function(e,t,i){},a5a2:function(e,t){e.exports=i},df6d:function(e,t,i){"use strict";i("054d")},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return ce})),"undefined"!==typeof window){var n=window.document.currentScript,o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(i.p=o[1])}var l=i("8bbf");const r={class:"oauth2-admin"};function a(e,t,i,n,o,a){const s=Object(l["resolveComponent"])("Oauth2ClientList"),c=Object(l["resolveComponent"])("Oauth2ClientEdit");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",r,[e.isEditMode?(Object(l["openBlock"])(),Object(l["createBlock"])(c,{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(l["openBlock"])(),Object(l["createBlock"])(s,{key:0,clients:e.clients,scopes:e.scopes,"authorize-url":e.authorizeUrl,"token-url":e.tokenUrl,onCreate:e.createClient,onEdit:e.editClient,onDeleted:e.onClientDeleted,onUpdated:e.onClientUpdated},null,8,["clients","scopes","authorize-url","token-url","onCreate","onEdit","onDeleted","onUpdated"]))])}var s=i("19dc");const c=e=>(Object(l["pushScopeId"])("data-v-19ab60c1"),e=e(),Object(l["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},m={class:"ui-confirm",ref:"confirmToggleClient"},h=["value"],u=["value"],p=["innerHTML"],O={style:{width:"180px"}},b={key:0},f=["title"],j={class:"client-id-code"},A={class:"redirect-uri"},C={class:"created-at"},_=["onClick","title"],y=["onClick","title"],v=["onClick","title"],g={key:1},S={colspan:"9"},N={class:"tableActionBar"},k=c(()=>Object(l["createElementVNode"])("span",{class:"icon-add"},null,-1));function E(e,t,i,n,o,r){const a=Object(l["resolveComponent"])("PasswordConfirmation"),s=Object(l["resolveComponent"])("ContentBlock"),c=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",d,[Object(l["createVNode"])(a,{modelValue:e.showDeleteConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showDeleteConfirmModal=t),onConfirmed:e.onDeleteConfirmed},null,8,["modelValue","onConfirmed"]),Object(l["createElementVNode"])("div",m,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.confirmToggleLabel),1),Object(l["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,h),Object(l["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,u)],512),Object(l["createVNode"])(s,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.adminClientsDescription)},null,8,p),Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminScope")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(l["createElementVNode"])("th",O,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("tbody",b,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.clients,t=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:t.client_id},[Object(l["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(l["toDisplayString"])(t.name),9,f),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.typeOptions[t.type]),1),Object(l["createElementVNode"])("td",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.grant_types||[],t=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:t},Object(l["toDisplayString"])(e.getGrantTypeLabel(t)),1))),128))]),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.getScopeLabel(t)),1),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("code",j,Object(l["toDisplayString"])(t.client_id),1)]),Object(l["createElementVNode"])("td",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.redirect_uris||[],e=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:e},[Object(l["createElementVNode"])("code",A,Object(l["toDisplayString"])(e),1)]))),128))]),Object(l["createElementVNode"])("td",C,Object(l["toDisplayString"])(t.created_at),1),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("button",{class:Object(l["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(l["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,_),Object(l["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(l["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,y),Object(l["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(l["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,v)])]))),128))])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("tbody",g,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("td",S,Object(l["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[c]]),Object(l["createElementVNode"])("div",N,[Object(l["createElementVNode"])("a",{class:"createNewClient",onClick:t[1]||(t[1]=Object(l["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[k,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}var V=i("a5a2");const w="oauth2clientlist";var D=Object(l["defineComponent"])({name:"Oauth2ClientList",props:{clients:{type:Array,required:!0},scopes:{type:Object,required:!0},authorizeUrl:{type:String,required:!0},tokenUrl:{type:String,required:!0}},emits:["create","edit","deleted","updated"],components:{ContentBlock:s["ContentBlock"],PasswordConfirmation:V["PasswordConfirmation"]},directives:{ContentTable:s["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",clientToDelete:null,showDeleteConfirmModal:!1,typeOptions:{confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},grantTypeOptions:{authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")}}},computed:{adminClientsDescription(){const e=`${this.authorizeUrl}`,t=`${this.tokenUrl}`;return`${this.translate("OAuth2_AdminClientsDescriptions")} ${this.translate("OAuth2_AdminClientDescriptionAdditionalHelpText",e,t)}`}},methods:{getShortScopeLabel(e){const t={"matomo:read":this.translate("UsersManager_PrivView"),"matomo:write":this.translate("UsersManager_PrivWrite"),"matomo:admin":this.translate("UsersManager_PrivAdmin"),"matomo:superuser":this.translate("OAuth2_ScopeSuperUserShort")};return t[e]||this.scopes[e]||e},showNotification(e,t,i=null){const n=s["NotificationsStore"].show({message:e,context:t,id:w,type:null!==i?i:"toast"});setTimeout(()=>{s["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){s["NotificationsStore"].remove(w),s["NotificationsStore"].remove("ajaxHelper")},getScopeLabel(e){var t;const i=null===(t=e.scopes)||void 0===t?void 0:t[0];return i?this.getShortScopeLabel(i):""},getGrantTypeLabel(e){return this.grantTypeOptions[e]||e},toggleClientStatus(e){const t=s["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),s["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{s["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=s["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=s["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),this.clientToDelete=e,this.showDeleteConfirmModal=!0},onDeleteConfirmed(e){this.showDeleteConfirmModal=!1;const t=this.clientToDelete;if(this.clientToDelete=null,!t)return;const i=s["Matomo"].helper.htmlEntities(t.name||t.client_id);s["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:t.client_id},{postParams:{passwordConfirmation:e}}).then(e=>{null!==e&&void 0!==e&&e.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",i),"success"),this.$emit("deleted",t.client_id))})}}});i("df6d");D.render=E,D.__scopeId="data-v-19ab60c1";var M=D;const B=e=>(Object(l["pushScopeId"])("data-v-9f0c0e34"),e=e(),Object(l["popScopeId"])(),e),T={class:"oauth2-admin oauth2-admin-edit"},P={key:0},U={class:"loadingPiwik"},I=B(()=>Object(l["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),x={class:"row"},H={class:"row"},L={key:0,class:"row"},$={key:1,class:"row oauth2-secret-head"},R={class:"col s12"},z={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},q={class:"col s12 m6"},G={class:"copy-secret-wrapper-div"},F={key:0,class:"client-secret-code"},W={key:1,class:"client-secret-code"},X={class:"col s12 m6"},Y=["innerHTML"],J={class:"row",name:"type"},K={class:"row",name:"grantType"},Q={class:"row",name:"scopes"},Z={class:"row"},ee={class:"row"},te=["disabled"],ie={class:"entityCancel"};function ne(e,t,i,n,o,r){const a=Object(l["resolveComponent"])("PasswordConfirmation"),s=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("ContentBlock"),d=Object(l["resolveDirective"])("copy-to-clipboard");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",T,[Object(l["createVNode"])(a,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.onPasswordConfirmed},null,8,["modelValue","onConfirmed"]),Object(l["createVNode"])(c,{"content-title":e.contentTitle},{default:Object(l["withCtx"])(()=>[e.loading?(Object(l["openBlock"])(),Object(l["createElementBlock"])("p",P,[Object(l["createElementVNode"])("span",U,[I,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("form",{key:1,onSubmit:t[9]||(t[9]=Object(l["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(l["createElementVNode"])("div",x,[Object(l["createVNode"])(s,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(l["createElementVNode"])("div",H,[Object(l["createVNode"])(s,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[2]||(t[2]=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(l["openBlock"])(),Object(l["createElementBlock"])("div",L,[Object(l["createVNode"])(s,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(l["createCommentVNode"])("",!0),e.showSecretPanel?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",$,[Object(l["createElementVNode"])("label",R,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:0,onClick:t[3]||(t[3]=Object(l["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(l["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(l["createCommentVNode"])("",!0)])])):Object(l["createCommentVNode"])("",!0),e.showSecretPanel?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",z,[Object(l["createElementVNode"])("div",q,[Object(l["createElementVNode"])("div",G,[e.visibleSecret?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("pre",F,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.displayedSecret),1)])),[[d,{}]]):(Object(l["openBlock"])(),Object(l["createElementBlock"])("pre",W,Object(l["toDisplayString"])(e.displayedSecret),1))])]),Object(l["createElementVNode"])("div",X,[Object(l["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,Y)])])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",J,[e.isEditMode?(Object(l["openBlock"])(),Object(l["createBlock"])(s,{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(l["openBlock"])(),Object(l["createBlock"])(s,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[4]||(t[4]=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(l["createElementVNode"])("div",K,[Object(l["createVNode"])(s,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[5]||(t[5]=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(l["createElementVNode"])("div",Q,[Object(l["createVNode"])(s,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(l["createElementVNode"])("div",Z,[Object(l["createVNode"])(s,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[7]||(t[7]=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(l["createElementVNode"])("div",ee,[Object(l["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(l["toDisplayString"])(e.submitLabel),9,te)]),Object(l["createElementVNode"])("div",ie,[Object(l["createElementVNode"])("a",{onClick:t[8]||(t[8]=Object(l["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(l["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}const oe="oauth2clientedit";function le(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 re=Object(l["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:s["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:s["ContentBlock"],Field:V["Field"],PasswordConfirmation:V["PasswordConfirmation"]},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:le(this.scopes),visibleSecret:this.initialSecret,showPasswordConfirmModal:!1,passwordConfirmAction:""}},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=le(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,s["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),this.passwordConfirmAction="rotate",this.showPasswordConfirmModal=!0)},submit(){this.removeNotifications(),this.checkRequiredFieldsAreSet()&&(this.confirmRotateLabel=this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminCreateTitle"),this.passwordConfirmAction="save",this.showPasswordConfirmModal=!0)},onPasswordConfirmed(e){this.showPasswordConfirmModal=!1,"rotate"===this.passwordConfirmAction?this.doRotateSecret(e):"save"===this.passwordConfirmAction&&this.saveClient(e),this.passwordConfirmAction=""},doRotateSecret(e){this.loading=!0,s["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId},{postParams:{passwordConfirmation:e}}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=`${this.visibleSecret}`,i=`${this.translate("OAuth2_AdminRotatedNotification")}
${this.translate("OAuth2_ClientSecretDisplayedNotification",t)}`;this.showNotification(`${i}`,"success","transient")}}).finally(()=>{this.loading=!1})},saveClient(e){this.loading=!0;const t={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&&(t.clientId=this.clientId),s["AjaxHelper"].fetch(t,{postParams:{passwordConfirmation:e}}).then(e=>{this.visibleSecret=e.secret||"";const t=s["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=`${this.visibleSecret}`,o=e.secret?`${this.translate("OAuth2_ClientSecretHelp")}
${this.translate("OAuth2_ClientSecretDisplayedNotification",n)}`:"",l=[i,o].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),s["MatomoUrl"].updateHash(Object.assign(Object.assign({},s["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(){s["NotificationsStore"].remove(oe),s["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=s["NotificationsStore"].show({message:e,context:t,id:oe,type:null!==i?i:"toast"});setTimeout(()=>{s["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("563e");re.render=ne,re.__scopeId="data-v-9f0c0e34";var ae=re,se=Object(l["defineComponent"])({name:"Oauth2AdminApp",props:{initialClients:{type:Array,required:!0},scopes:{type:Object,required:!0},authorizeUrl:{type:String,required:!0},tokenUrl:{type:String,required:!0}},components:{Oauth2ClientList:M,Oauth2ClientEdit:ae},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(l["watch"])(()=>s["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(s["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(){s["MatomoUrl"].updateHash(Object.assign(Object.assign({},s["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),s["MatomoUrl"].updateHash(Object.assign(Object.assign({},s["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},s["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",s["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}}});se.render=a;var ce=se; +(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 o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.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 o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));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")}({"054d":function(e,t,i){},"19dc":function(t,i){t.exports=e},"6c4a":function(e,t,i){},"7a8a":function(e,t,i){"use strict";i("6c4a")},"8bbf":function(e,i){e.exports=t},a5a2:function(e,t){e.exports=i},df6d:function(e,t,i){"use strict";i("054d")},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return ce})),"undefined"!==typeof window){var n=window.document.currentScript,o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(i.p=o[1])}var l=i("8bbf");const r={class:"oauth2-admin"};function s(e,t,i,n,o,s){const a=Object(l["resolveComponent"])("Oauth2ClientList"),c=Object(l["resolveComponent"])("Oauth2ClientEdit");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",r,[e.isEditMode?(Object(l["openBlock"])(),Object(l["createBlock"])(c,{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(l["openBlock"])(),Object(l["createBlock"])(a,{key:0,clients:e.clients,scopes:e.scopes,"authorize-url":e.authorizeUrl,"token-url":e.tokenUrl,onCreate:e.createClient,onEdit:e.editClient,onDeleted:e.onClientDeleted,onUpdated:e.onClientUpdated},null,8,["clients","scopes","authorize-url","token-url","onCreate","onEdit","onDeleted","onUpdated"]))])}var a=i("19dc");const c=e=>(Object(l["pushScopeId"])("data-v-19ab60c1"),e=e(),Object(l["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},m={class:"ui-confirm",ref:"confirmToggleClient"},h=["value"],u=["value"],p=["innerHTML"],O={style:{width:"180px"}},b={key:0},f=["title"],j={class:"client-id-code"},A={class:"redirect-uri"},C={class:"created-at"},_=["onClick","title"],y=["onClick","title"],v=["onClick","title"],g={key:1},S={colspan:"9"},N={class:"tableActionBar"},k=c(()=>Object(l["createElementVNode"])("span",{class:"icon-add"},null,-1));function E(e,t,i,n,o,r){const s=Object(l["resolveComponent"])("PasswordConfirmation"),a=Object(l["resolveComponent"])("ContentBlock"),c=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",d,[Object(l["createVNode"])(s,{modelValue:e.showDeleteConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showDeleteConfirmModal=t),onConfirmed:e.onDeleteConfirmed},null,8,["modelValue","onConfirmed"]),Object(l["createElementVNode"])("div",m,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.confirmToggleLabel),1),Object(l["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,h),Object(l["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,u)],512),Object(l["createVNode"])(a,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(l["withCtx"])(()=>[Object(l["createElementVNode"])("p",{innerHTML:e.$sanitize(e.adminClientsDescription)},null,8,p),Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminScope")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(l["createElementVNode"])("th",O,Object(l["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("tbody",b,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.clients,t=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:t.client_id},[Object(l["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(l["toDisplayString"])(t.name),9,f),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.typeOptions[t.type]),1),Object(l["createElementVNode"])("td",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.grant_types||[],t=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:t},Object(l["toDisplayString"])(e.getGrantTypeLabel(t)),1))),128))]),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.getScopeLabel(t)),1),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("code",j,Object(l["toDisplayString"])(t.client_id),1)]),Object(l["createElementVNode"])("td",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.redirect_uris||[],e=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:e},[Object(l["createElementVNode"])("code",A,Object(l["toDisplayString"])(e),1)]))),128))]),Object(l["createElementVNode"])("td",C,Object(l["toDisplayString"])(t.created_at),1),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("button",{class:Object(l["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(l["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,_),Object(l["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(l["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,y),Object(l["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(l["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,v)])]))),128))])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("tbody",g,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("td",S,Object(l["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[c]]),Object(l["createElementVNode"])("div",N,[Object(l["createElementVNode"])("a",{class:"createNewClient",onClick:t[1]||(t[1]=Object(l["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[k,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}var V=i("a5a2");const w="oauth2clientlist";var D=Object(l["defineComponent"])({name:"Oauth2ClientList",props:{clients:{type:Array,required:!0},scopes:{type:Object,required:!0},authorizeUrl:{type:String,required:!0},tokenUrl:{type:String,required:!0}},emits:["create","edit","deleted","updated"],components:{ContentBlock:a["ContentBlock"],PasswordConfirmation:V["PasswordConfirmation"]},directives:{ContentTable:a["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",clientToDelete:null,showDeleteConfirmModal:!1,typeOptions:{confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},grantTypeOptions:{authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")}}},computed:{adminClientsDescription(){const e=`${this.authorizeUrl}`,t=`${this.tokenUrl}`;return`${this.translate("OAuth2_AdminClientsDescriptions")} ${this.translate("OAuth2_AdminClientDescriptionAdditionalHelpText",e,t)}`}},methods:{getShortScopeLabel(e){const t={"matomo:read":this.translate("UsersManager_PrivView"),"matomo:write":this.translate("UsersManager_PrivWrite"),"matomo:admin":this.translate("UsersManager_PrivAdmin"),"matomo:superuser":this.translate("OAuth2_ScopeSuperUserShort")};return t[e]||this.scopes[e]||e},showNotification(e,t,i=null){const n=a["NotificationsStore"].show({message:e,context:t,id:w,type:null!==i?i:"toast"});setTimeout(()=>{a["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){a["NotificationsStore"].remove(w),a["NotificationsStore"].remove("ajaxHelper")},getScopeLabel(e){var t;const i=null===(t=e.scopes)||void 0===t?void 0:t[0];return i?this.getShortScopeLabel(i):""},getGrantTypeLabel(e){return this.grantTypeOptions[e]||e},toggleClientStatus(e){const t=a["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),a["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{a["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=a["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=a["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),this.clientToDelete=e,this.showDeleteConfirmModal=!0},onDeleteConfirmed(e){this.showDeleteConfirmModal=!1;const t=this.clientToDelete;if(this.clientToDelete=null,!t)return;const i=a["Matomo"].helper.htmlEntities(t.name||t.client_id);a["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:t.client_id},{postParams:{passwordConfirmation:e}}).then(e=>{null!==e&&void 0!==e&&e.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",i),"success"),this.$emit("deleted",t.client_id))})}}});i("df6d");D.render=E,D.__scopeId="data-v-19ab60c1";var M=D;const B=e=>(Object(l["pushScopeId"])("data-v-02b0c366"),e=e(),Object(l["popScopeId"])(),e),T={class:"oauth2-admin oauth2-admin-edit"},P={key:0},U={class:"loadingPiwik"},I=B(()=>Object(l["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),x={class:"row"},H={class:"row"},L={key:0,class:"row"},$={key:1,class:"row oauth2-secret-head"},R={class:"col s12"},z={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},q={class:"col s12 m6"},G={class:"copy-secret-wrapper-div"},F={key:0,class:"client-secret-code"},W={key:1,class:"client-secret-code"},X={class:"col s12 m6"},Y=["innerHTML"],J={class:"row",name:"type"},K={class:"row",name:"grantType"},Q={class:"row",name:"scopes"},Z={class:"row"},ee={class:"row"},te=["disabled"],ie={class:"entityCancel"};function ne(e,t,i,n,o,r){const s=Object(l["resolveComponent"])("PasswordConfirmation"),a=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("ContentBlock"),d=Object(l["resolveDirective"])("copy-to-clipboard");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",T,[Object(l["createVNode"])(s,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.onPasswordConfirmed},null,8,["modelValue","onConfirmed"]),Object(l["createVNode"])(c,{"content-title":e.contentTitle},{default:Object(l["withCtx"])(()=>[e.loading?(Object(l["openBlock"])(),Object(l["createElementBlock"])("p",P,[Object(l["createElementVNode"])("span",U,[I,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("form",{key:1,onSubmit:t[9]||(t[9]=Object(l["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(l["createElementVNode"])("div",x,[Object(l["createVNode"])(a,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(l["createElementVNode"])("div",H,[Object(l["createVNode"])(a,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[2]||(t[2]=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(l["openBlock"])(),Object(l["createElementBlock"])("div",L,[Object(l["createVNode"])(a,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(l["createCommentVNode"])("",!0),e.showSecretPanel?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",$,[Object(l["createElementVNode"])("label",R,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:0,onClick:t[3]||(t[3]=Object(l["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(l["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(l["createCommentVNode"])("",!0)])])):Object(l["createCommentVNode"])("",!0),e.showSecretPanel?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",z,[Object(l["createElementVNode"])("div",q,[Object(l["createElementVNode"])("div",G,[e.visibleSecret?Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("pre",F,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.displayedSecret),1)])),[[d,{}]]):(Object(l["openBlock"])(),Object(l["createElementBlock"])("pre",W,Object(l["toDisplayString"])(e.displayedSecret),1))])]),Object(l["createElementVNode"])("div",X,[Object(l["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,Y)])])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",J,[e.isEditMode?(Object(l["openBlock"])(),Object(l["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(l["openBlock"])(),Object(l["createBlock"])(a,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[4]||(t[4]=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(l["createElementVNode"])("div",K,[Object(l["createVNode"])(a,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[5]||(t[5]=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(l["createElementVNode"])("div",Q,[Object(l["createVNode"])(a,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(l["createElementVNode"])("div",Z,[Object(l["createVNode"])(a,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[7]||(t[7]=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(l["createElementVNode"])("div",ee,[Object(l["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(l["toDisplayString"])(e.submitLabel),9,te)]),Object(l["createElementVNode"])("div",ie,[Object(l["createElementVNode"])("a",{onClick:t[8]||(t[8]=Object(l["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(l["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}const oe="oauth2clientedit";function le(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 re=Object(l["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:a["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:a["ContentBlock"],Field:V["Field"],PasswordConfirmation:V["PasswordConfirmation"]},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:le(this.scopes),originalScope:"",visibleSecret:this.initialSecret,showPasswordConfirmModal:!1,passwordConfirmAction:""}},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=le(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,a["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},this.originalScope=this.form.scope}).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),this.passwordConfirmAction="rotate",this.showPasswordConfirmModal=!0)},submit(){this.removeNotifications(),this.checkRequiredFieldsAreSet()&&(this.confirmRotateLabel=this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminCreateTitle"),this.passwordConfirmAction="save",this.showPasswordConfirmModal=!0)},onPasswordConfirmed(e){this.showPasswordConfirmModal=!1,"rotate"===this.passwordConfirmAction?this.doRotateSecret(e):"save"===this.passwordConfirmAction&&this.saveClient(e),this.passwordConfirmAction=""},doRotateSecret(e){this.loading=!0,a["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId},{postParams:{passwordConfirmation:e}}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=`${this.visibleSecret}`,i=`${this.translate("OAuth2_AdminRotatedNotification")}
${this.translate("OAuth2_ClientSecretDisplayedNotification",t)}`;this.showNotification(`${i}`,"success","transient")}}).finally(()=>{this.loading=!1})},scopeLevel(e){const t={"matomo:read":1,"matomo:write":2,"matomo:admin":3,"matomo:superuser":4};return t[e]||0},saveClient(e){this.loading=!0;const t=this.isEditMode&&this.scopeLevel(this.form.scope){this.visibleSecret=e.secret||"";const i=a["Matomo"].helper.htmlEntities(e.client.name||""),n=this.isEditMode?this.translate("OAuth2_AdminUpdated",i):this.translate("OAuth2_AdminCreated",i),o=`${this.visibleSecret}`,l=e.secret?`${this.translate("OAuth2_ClientSecretHelp")}
${this.translate("OAuth2_ClientSecretDisplayedNotification",o)}`:"",r=[n,l].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),a["MatomoUrl"].updateHash(Object.assign(Object.assign({},a["MatomoUrl"].hashParsed.value),{},{idClient:e.client.client_id})),this.originalScope=this.form.scope,setTimeout(()=>{this.showNotification(`${r}`,"success","transient"),t&&this.showNotification(this.translate("OAuth2_AdminScopeReducedWarning"),"warning","persistent",oe+"scopereduced")},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(){a["NotificationsStore"].remove(oe),a["NotificationsStore"].remove(oe+"scopereduced"),a["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null,n=oe){const o=a["NotificationsStore"].show({message:e,context:t,id:n,type:null!==i?i:"toast"});setTimeout(()=>{a["NotificationsStore"].scrollToNotification(o)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("7a8a");re.render=ne,re.__scopeId="data-v-02b0c366";var se=re,ae=Object(l["defineComponent"])({name:"Oauth2AdminApp",props:{initialClients:{type:Array,required:!0},scopes:{type:Object,required:!0},authorizeUrl:{type:String,required:!0},tokenUrl:{type:String,required:!0}},components:{Oauth2ClientList:M,Oauth2ClientEdit:se},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(l["watch"])(()=>a["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(a["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(){a["MatomoUrl"].updateHash(Object.assign(Object.assign({},a["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),a["MatomoUrl"].updateHash(Object.assign(Object.assign({},a["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},a["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",a["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}}});ae.render=s;var ce=ae; /*! * Matomo - free/libre analytics platform * diff --git a/vue/dist/OAuth2.umd.min.js.map b/vue/dist/OAuth2.umd.min.js.map index 6a8d253..9e64148 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/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?207c","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?5fa3","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","authorize-url","authorizeUrl","token-url","tokenUrl","createClient","editClient","onClientDeleted","onClientUpdated","ref","style","colspan","showDeleteConfirmModal","onDeleteConfirmed","confirmToggleLabel","role","type","translate","content-title","feature","$sanitize","adminClientsDescription","length","client","client_id","title","description","typeOptions","grant_types","grantType","getGrantTypeLabel","getScopeLabel","active","redirect_uris","uri","created_at","toggleClientStatus","$emit","deleteClient","notificationId","props","Array","required","String","emits","components","ContentBlock","PasswordConfirmation","directives","ContentTable","confirmDeleteLabel","clientToDelete","confidential","public","grantTypeOptions","authorization_code","client_credentials","refresh_token","computed","methods","scope","shortScopeLabels","message","context","instanceId","show","id","setTimeout","scrollToNotification","remove","getShortScopeLabel","safeClientName","helper","htmlEntities","modalConfirm","$refs","confirmToggleClient","yes","fetch","method","clientId","then","response","removeNotifications","safeUpdatedClientName","showNotification","passwordConfirmation","postParams","deleted","render","__scopeId","showPasswordConfirmModal","onPasswordConfirmed","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","submitLabel","getDefaultForm","firstScope","keys","initialSecret","default","CopyToClipboard","Field","grantOptions","confirmRotateLabel","passwordConfirmAction","init","watch","newSecret","filtered","join","finally","newType","includes","filter","checkRequiredFieldsAreSet","doRotateSecret","saveClient","code","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,OAA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sK,EAAOS,SACdvM,KAAKkD,OAAS,GACdlD,KAAK8M,eAAiB,GACtB,eAAUT,WAAWP,IAEvB,cAAckB,GACZ,MAAMC,EAAQjN,KAAKqD,QAAQ6J,UACxBtI,GAAWA,EAAOC,YAAcmI,EAAQpI,OAAOC,YAEnC,IAAXoI,EACFjN,KAAKqD,QAAQ8J,KAAKH,EAAQpI,QAE1B5E,KAAKqD,QAAQ+J,OAAOH,EAAO,EAAGD,EAAQpI,QAGxC5E,KAAKqD,QAAU,IAAIrD,KAAKqD,SAASgK,KAAK,CAACC,EAAMC,KAC3C,MAAMC,EAAWF,EAAKG,WAAa,IAAIC,KAAKJ,EAAKG,YAAYE,UAAY,EACnEC,EAAYL,EAAME,WAAa,IAAIC,KAAKH,EAAME,YAAYE,UAAY,EAE5E,OAAIC,IAAcJ,EACTI,EAAYJ,EAGdF,EAAKxM,KAAK+M,cAAcN,EAAMzM,QAEvCd,KAAKkD,OAAS8J,EAAQ9J,QAAU,GAChClD,KAAK8M,eAAiBE,EAAQ9J,OAAS8J,EAAQpI,OAAOC,UAAY,IAEpE,gBAAgBwD,GACdrI,KAAKkD,OAAS,GACVlD,KAAK8M,iBAAmBzE,IAC1BrI,KAAK8M,eAAiB,IAExB9M,KAAKqD,QAAUrD,KAAKqD,QAAQoI,OAAQ7G,GAAWA,EAAOC,YAAcwD,IAEtE,gBAAgByF,GACd,MAAMb,EAAQjN,KAAKqD,QAAQ6J,UACxBtI,GAAWA,EAAOC,YAAciJ,EAAcjJ,YAElC,IAAXoI,IAIJjN,KAAKqD,QAAQ+J,OAAOH,EAAO,EAAGa,GAC9B9N,KAAKqD,QAAU,IAAIrD,KAAKqD,YAG5B0D,SAAU,CACR,aACE,QAAS/G,KAAK+C,mBC/HpB,GAAO+F,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","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","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=9f0c0e34&scoped=true&lang=css\"","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!./List.vue?vue&type=style&index=0&id=19ab60c1&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 { PasswordConfirmation } from 'CorePluginsAdmin';\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 scopes: {\n type: Object as PropType>,\n required: true,\n },\n authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n PasswordConfirmation,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n clientToDelete: null as Client|null,\n showDeleteConfirmModal: false,\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n grantTypeOptions: {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n } as Record,\n };\n },\n computed: {\n adminClientsDescription(): string {\n const authorizeUrl = `${this.authorizeUrl}`;\n const tokenUrl = `${this.tokenUrl}`;\n\n return `${this.translate('OAuth2_AdminClientsDescriptions')} ${this.translate('OAuth2_AdminClientDescriptionAdditionalHelpText', authorizeUrl, tokenUrl)}`;\n },\n },\n methods: {\n getShortScopeLabel(scope: string) {\n const shortScopeLabels = {\n 'matomo:read': this.translate('UsersManager_PrivView'),\n 'matomo:write': this.translate('UsersManager_PrivWrite'),\n 'matomo:admin': this.translate('UsersManager_PrivAdmin'),\n 'matomo:superuser': this.translate('OAuth2_ScopeSuperUserShort'),\n } as Record;\n\n return shortScopeLabels[scope] || this.scopes[scope] || scope;\n },\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 getScopeLabel(client: Client) {\n const scope = client.scopes?.[0];\n\n if (!scope) {\n return '';\n }\n\n return this.getShortScopeLabel(scope);\n },\n getGrantTypeLabel(grantType: string) {\n return this.grantTypeOptions[grantType] || grantType;\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 this.clientToDelete = client;\n this.showDeleteConfirmModal = true;\n },\n onDeleteConfirmed(passwordConfirmation: string) {\n this.showDeleteConfirmModal = false;\n const client = this.clientToDelete;\n this.clientToDelete = null;\n\n if (!client) {\n return;\n }\n\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n },\n {\n postParams: {\n passwordConfirmation,\n },\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","import { render } from \"./List.vue?vue&type=template&id=19ab60c1&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=19ab60c1&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-19ab60c1\"\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, PasswordConfirmation } 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 PasswordConfirmation,\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 showPasswordConfirmModal: false,\n passwordConfirmAction: '',\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 this.passwordConfirmAction = 'rotate';\n this.showPasswordConfirmModal = true;\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.confirmRotateLabel = this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminCreateTitle');\n this.passwordConfirmAction = 'save';\n this.showPasswordConfirmModal = true;\n },\n onPasswordConfirmed(passwordConfirmation: string) {\n this.showPasswordConfirmModal = false;\n if (this.passwordConfirmAction === 'rotate') {\n this.doRotateSecret(passwordConfirmation);\n } else if (this.passwordConfirmAction === 'save') {\n this.saveClient(passwordConfirmation);\n }\n this.passwordConfirmAction = '';\n },\n doRotateSecret(passwordConfirmation: string) {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n },\n {\n postParams: {\n passwordConfirmation,\n },\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const code = `${this.visibleSecret}`;\n const message = `${this.translate('OAuth2_AdminRotatedNotification')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`;\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n saveClient(passwordConfirmation: string) {\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, { postParams: { passwordConfirmation } }).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 code = `${this.visibleSecret}`;\n const secretMessage = response.secret\n ? `${this.translate('OAuth2_ClientSecretHelp')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`\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=9f0c0e34&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=9f0c0e34&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-9f0c0e34\"\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 authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\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=096198f6\"\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/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?6556","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?5fa3","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","authorize-url","authorizeUrl","token-url","tokenUrl","createClient","editClient","onClientDeleted","onClientUpdated","ref","style","colspan","showDeleteConfirmModal","onDeleteConfirmed","confirmToggleLabel","role","type","translate","content-title","feature","$sanitize","adminClientsDescription","length","client","client_id","title","description","typeOptions","grant_types","grantType","getGrantTypeLabel","getScopeLabel","active","redirect_uris","uri","created_at","toggleClientStatus","$emit","deleteClient","notificationId","props","Array","required","String","emits","components","ContentBlock","PasswordConfirmation","directives","ContentTable","confirmDeleteLabel","clientToDelete","confidential","public","grantTypeOptions","authorization_code","client_credentials","refresh_token","computed","methods","scope","shortScopeLabels","message","context","instanceId","show","id","setTimeout","scrollToNotification","remove","getShortScopeLabel","safeClientName","helper","htmlEntities","modalConfirm","$refs","confirmToggleClient","yes","fetch","method","clientId","then","response","removeNotifications","safeUpdatedClientName","showNotification","passwordConfirmation","postParams","deleted","render","__scopeId","showPasswordConfirmModal","onPasswordConfirmed","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","submitLabel","getDefaultForm","firstScope","keys","initialSecret","default","CopyToClipboard","Field","grantOptions","confirmRotateLabel","originalScope","passwordConfirmAction","init","watch","newSecret","filtered","join","finally","newType","includes","filter","checkRequiredFieldsAreSet","doRotateSecret","saveClient","code","levels","scopeWasReduced","scopeLevel","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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1I,GAAWA,EAAOC,YAAcuI,EAAQxI,OAAOC,YAEnC,IAAXwI,EACFrN,KAAKqD,QAAQkK,KAAKH,EAAQxI,QAE1B5E,KAAKqD,QAAQmK,OAAOH,EAAO,EAAGD,EAAQxI,QAGxC5E,KAAKqD,QAAU,IAAIrD,KAAKqD,SAASoK,KAAK,CAACC,EAAMC,KAC3C,MAAMC,EAAWF,EAAKG,WAAa,IAAIC,KAAKJ,EAAKG,YAAYE,UAAY,EACnEC,EAAYL,EAAME,WAAa,IAAIC,KAAKH,EAAME,YAAYE,UAAY,EAE5E,OAAIC,IAAcJ,EACTI,EAAYJ,EAGdF,EAAK5M,KAAKmN,cAAcN,EAAM7M,QAEvCd,KAAKkD,OAASkK,EAAQlK,QAAU,GAChClD,KAAKkN,eAAiBE,EAAQlK,OAASkK,EAAQxI,OAAOC,UAAY,IAEpE,gBAAgBwD,GACdrI,KAAKkD,OAAS,GACVlD,KAAKkN,iBAAmB7E,IAC1BrI,KAAKkN,eAAiB,IAExBlN,KAAKqD,QAAUrD,KAAKqD,QAAQqI,OAAQ9G,GAAWA,EAAOC,YAAcwD,IAEtE,gBAAgB6F,GACd,MAAMb,EAAQrN,KAAKqD,QAAQiK,UACxB1I,GAAWA,EAAOC,YAAcqJ,EAAcrJ,YAElC,IAAXwI,IAIJrN,KAAKqD,QAAQmK,OAAOH,EAAO,EAAGa,GAC9BlO,KAAKqD,QAAU,IAAIrD,KAAKqD,YAG5B0D,SAAU,CACR,aACE,QAAS/G,KAAK+C,mBC/HpB,GAAO+F,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","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","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=02b0c366&scoped=true&lang=css\"","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!./List.vue?vue&type=style&index=0&id=19ab60c1&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 { PasswordConfirmation } from 'CorePluginsAdmin';\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 scopes: {\n type: Object as PropType>,\n required: true,\n },\n authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n PasswordConfirmation,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n clientToDelete: null as Client|null,\n showDeleteConfirmModal: false,\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n grantTypeOptions: {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n } as Record,\n };\n },\n computed: {\n adminClientsDescription(): string {\n const authorizeUrl = `${this.authorizeUrl}`;\n const tokenUrl = `${this.tokenUrl}`;\n\n return `${this.translate('OAuth2_AdminClientsDescriptions')} ${this.translate('OAuth2_AdminClientDescriptionAdditionalHelpText', authorizeUrl, tokenUrl)}`;\n },\n },\n methods: {\n getShortScopeLabel(scope: string) {\n const shortScopeLabels = {\n 'matomo:read': this.translate('UsersManager_PrivView'),\n 'matomo:write': this.translate('UsersManager_PrivWrite'),\n 'matomo:admin': this.translate('UsersManager_PrivAdmin'),\n 'matomo:superuser': this.translate('OAuth2_ScopeSuperUserShort'),\n } as Record;\n\n return shortScopeLabels[scope] || this.scopes[scope] || scope;\n },\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 getScopeLabel(client: Client) {\n const scope = client.scopes?.[0];\n\n if (!scope) {\n return '';\n }\n\n return this.getShortScopeLabel(scope);\n },\n getGrantTypeLabel(grantType: string) {\n return this.grantTypeOptions[grantType] || grantType;\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 this.clientToDelete = client;\n this.showDeleteConfirmModal = true;\n },\n onDeleteConfirmed(passwordConfirmation: string) {\n this.showDeleteConfirmModal = false;\n const client = this.clientToDelete;\n this.clientToDelete = null;\n\n if (!client) {\n return;\n }\n\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n },\n {\n postParams: {\n passwordConfirmation,\n },\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","import { render } from \"./List.vue?vue&type=template&id=19ab60c1&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=19ab60c1&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-19ab60c1\"\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, PasswordConfirmation } 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 PasswordConfirmation,\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 originalScope: '',\n visibleSecret: this.initialSecret,\n showPasswordConfirmModal: false,\n passwordConfirmAction: '',\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 this.originalScope = this.form.scope;\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 this.passwordConfirmAction = 'rotate';\n this.showPasswordConfirmModal = true;\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.confirmRotateLabel = this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminCreateTitle');\n this.passwordConfirmAction = 'save';\n this.showPasswordConfirmModal = true;\n },\n onPasswordConfirmed(passwordConfirmation: string) {\n this.showPasswordConfirmModal = false;\n if (this.passwordConfirmAction === 'rotate') {\n this.doRotateSecret(passwordConfirmation);\n } else if (this.passwordConfirmAction === 'save') {\n this.saveClient(passwordConfirmation);\n }\n this.passwordConfirmAction = '';\n },\n doRotateSecret(passwordConfirmation: string) {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n },\n {\n postParams: {\n passwordConfirmation,\n },\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const code = `${this.visibleSecret}`;\n const message = `${this.translate('OAuth2_AdminRotatedNotification')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`;\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n scopeLevel(scope: string): number {\n const levels: Record = {\n 'matomo:read': 1,\n 'matomo:write': 2,\n 'matomo:admin': 3,\n 'matomo:superuser': 4,\n };\n\n return levels[scope] || 0;\n },\n saveClient(passwordConfirmation: string) {\n this.loading = true;\n const scopeWasReduced = this.isEditMode\n && this.scopeLevel(this.form.scope) < this.scopeLevel(this.originalScope);\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, { postParams: { passwordConfirmation } }).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 code = `${this.visibleSecret}`;\n const secretMessage = response.secret\n ? `${this.translate('OAuth2_ClientSecretHelp')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`\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 this.originalScope = this.form.scope;\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n if (scopeWasReduced) {\n this.showNotification(\n this.translate('OAuth2_AdminScopeReducedWarning'),\n 'warning',\n 'persistent',\n `${notificationId}scopereduced`,\n );\n }\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(`${notificationId}scopereduced`);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null, id: string = notificationId) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id,\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=02b0c366&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=02b0c366&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-02b0c366\"\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 authorizeUrl: {\n type: String,\n required: true,\n },\n tokenUrl: {\n type: String,\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=096198f6\"\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 05e7415..0465d03 100644 --- a/vue/src/OAuthClients/Edit.vue +++ b/vue/src/OAuthClients/Edit.vue @@ -245,6 +245,7 @@ export default defineComponent({ typeOptions, grantOptions, form: getDefaultForm(this.scopes), + originalScope: '', visibleSecret: this.initialSecret, showPasswordConfirmModal: false, passwordConfirmAction: '', @@ -331,6 +332,7 @@ export default defineComponent({ redirect_uris: (client.redirect_uris || []).join('\n'), active: !!client.active, }; + this.originalScope = this.form.scope; }).finally(() => { this.loading = false; }); @@ -395,8 +397,20 @@ export default defineComponent({ this.loading = false; }); }, + scopeLevel(scope: string): number { + const levels: Record = { + 'matomo:read': 1, + 'matomo:write': 2, + 'matomo:admin': 3, + 'matomo:superuser': 4, + }; + + return levels[scope] || 0; + }, saveClient(passwordConfirmation: string) { this.loading = true; + const scopeWasReduced = this.isEditMode + && this.scopeLevel(this.form.scope) < this.scopeLevel(this.originalScope); const params = { method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient', name: this.form.name.trim(), @@ -434,8 +448,18 @@ export default defineComponent({ idClient: response.client.client_id, }); + this.originalScope = this.form.scope; + setTimeout(() => { this.showNotification(`${message}`, 'success', 'transient'); + if (scopeWasReduced) { + this.showNotification( + this.translate('OAuth2_AdminScopeReducedWarning'), + 'warning', + 'persistent', + `${notificationId}scopereduced`, + ); + } }, 50); }).finally(() => { this.loading = false; @@ -469,14 +493,15 @@ export default defineComponent({ }, removeNotifications() { NotificationsStore.remove(notificationId); + NotificationsStore.remove(`${notificationId}scopereduced`); NotificationsStore.remove('ajaxHelper'); }, showNotification(message: string, context: NotificationType['context'], - type: null|NotificationType['type'] = null) { + type: null|NotificationType['type'] = null, id: string = notificationId) { const notificationInstanceId = NotificationsStore.show({ message, context, - id: notificationId, + id, type: type !== null ? type : 'toast', }); setTimeout(() => {