From 07c68095f485501fec348e1b795b4779c2c39afb Mon Sep 17 00:00:00 2001 From: Altamash Shaikh Date: Thu, 7 May 2026 12:30:02 +0530 Subject: [PATCH 1/2] Fixes various QA identified issues, #PG-5091 --- API.php | 47 +++++++++++-- CHANGELOG.md | 3 +- OAuth2.php | 2 + SystemSettings.php | 12 ++-- lang/en.json | 2 + tests/Integration/APITest.php | 53 ++++++++++++++ tests/UI/OAuth2_spec.js | 11 ++- vue/dist/OAuth2.css | 2 +- vue/dist/OAuth2.umd.js | 122 +++++++++++++++++---------------- vue/dist/OAuth2.umd.js.map | 2 +- vue/dist/OAuth2.umd.min.js | 2 +- vue/dist/OAuth2.umd.min.js.map | 2 +- vue/src/OAuthClients/Edit.vue | 6 +- 13 files changed, 184 insertions(+), 82 deletions(-) diff --git a/API.php b/API.php index 539d90d..fc2b301 100644 --- a/API.php +++ b/API.php @@ -262,13 +262,7 @@ private function buildValidatedClientData( ): array { $type = $type === 'public' ? 'public' : 'confidential'; - $redirects = is_array($redirectUris) ? $redirectUris : preg_split('/[\r\n]+/', (string) $redirectUris); - if ($redirects === false) { - $redirects = []; - } - $redirects = array_values(array_filter(array_map('trim', $redirects), static function ($value) { - return $value !== ''; - })); + $redirects = $this->parseRedirectUris($redirectUris); $grantTypes = array_values(array_filter(array_map('trim', (array) $grantTypes), static function ($value) { return $value !== ''; @@ -298,6 +292,45 @@ private function buildValidatedClientData( ]; } + private function parseRedirectUris($redirectUris): array + { + if (is_array($redirectUris)) { + $rawRedirects = $redirectUris; + } else { + $rawRedirects = preg_split("/\r\n|\n|\r/", (string) $redirectUris); + if ($rawRedirects === false) { + $rawRedirects = []; + } + } + + $redirects = []; + + foreach ($rawRedirects as $rawRedirectUri) { + $rawRedirectUri = is_string($rawRedirectUri) ? $rawRedirectUri : (string) $rawRedirectUri; + + if (trim($rawRedirectUri) === '') { + continue; + } + + $parsedRedirectUri = parse_url($rawRedirectUri); + + if ( + $rawRedirectUri !== trim($rawRedirectUri) + || preg_match('/\s/', $rawRedirectUri) === 1 + || str_contains($rawRedirectUri, '\\') + || $parsedRedirectUri === false + || preg_match('~https?://~i', (string) ($parsedRedirectUri['path'] ?? '')) === 1 + || preg_match('~https?://~i', (string) ($parsedRedirectUri['fragment'] ?? '')) === 1 + ) { + throw new \InvalidArgumentException(Piwik::translate('OAuth2_InvalidRedirectUri') . ': ' . $rawRedirectUri); + } + + $redirects[] = $rawRedirectUri; + } + + return array_values($redirects); + } + private function validateRedirectUris(array $redirectUris, array $grantTypes): void { if (!in_array('authorization_code', $grantTypes, true)) { diff --git a/CHANGELOG.md b/CHANGELOG.md index 7808f6e..541da5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ 5.0.3 - 2026-05-11 -- Added code to show token and authorize URL at the top of list screen +- Added code to show token and authorize URL at the top of list screen +- Added better validation check for redirect URL, setting values and show client secret along with success message 5.0.2 - 2026-04-27 - Updated API documentation diff --git a/OAuth2.php b/OAuth2.php index 18b804f..bfda5f2 100644 --- a/OAuth2.php +++ b/OAuth2.php @@ -165,6 +165,8 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'OAuth2_AdminResumeConfirm'; $translationKeys[] = 'OAuth2_ClientSecretMaskedHelp'; $translationKeys[] = 'OAuth2_ClientSecretVisibleHelp'; + $translationKeys[] = 'OAuth2_ClientSecretDisplayedNotification'; + $translationKeys[] = 'OAuth2_InvalidOrExpiredAccessToken'; $translationKeys[] = 'OAuth2_AdminDescriptionPlaceholder'; $translationKeys[] = 'OAuth2_AdminRotatedNotification'; $translationKeys[] = 'OAuth2_ScopeSuperUserShort'; diff --git a/SystemSettings.php b/SystemSettings.php index c5dac57..071119b 100644 --- a/SystemSettings.php +++ b/SystemSettings.php @@ -32,8 +32,8 @@ protected function init() $field->description = Piwik::translate('OAuth2_SystemSettingOAuthAccessTokenLifetimeDescription'); $field->uiControl = FieldConfig::UI_CONTROL_TEXT; $field->validate = function ($value) { - if ($value <= 0) { - throw new \Exception(Piwik::translate('OAuth2_InvalidValueException')); + if ($value <= 0 || !is_numeric($value)) { + throw new \Exception(Piwik::translate('OAuth2_InvalidNumericValueException')); } }; }); @@ -43,8 +43,8 @@ protected function init() $field->description = Piwik::translate('OAuth2_SystemSettingOAuthRefreshTokenLifetimeDescription'); $field->uiControl = FieldConfig::UI_CONTROL_TEXT; $field->validate = function ($value) { - if ($value <= 0) { - throw new \Exception(Piwik::translate('OAuth2_InvalidValueException')); + if ($value <= 0 || !is_numeric($value)) { + throw new \Exception(Piwik::translate('OAuth2_InvalidNumericValueException')); } }; }); @@ -54,8 +54,8 @@ protected function init() $field->description = Piwik::translate('OAuth2_SystemSettingOAuthAuthorizationCodeLifetimeDescription'); $field->uiControl = FieldConfig::UI_CONTROL_TEXT; $field->validate = function ($value) { - if ($value <= 0) { - throw new \Exception(Piwik::translate('OAuth2_InvalidValueException')); + if ($value <= 0 || !is_numeric($value)) { + throw new \Exception(Piwik::translate('OAuth2_InvalidNumericValueException')); } }; }); diff --git a/lang/en.json b/lang/en.json index a357c4e..79a3603 100644 --- a/lang/en.json +++ b/lang/en.json @@ -69,6 +69,7 @@ "AuthorizationCodeGrantDisabled": "Authorization code grant is disabled.", "ClientSecret": "Client secret", "ClientSecretHelp": "Copy the client secret now, it will not be shown again.", + "ClientSecretDisplayedNotification": "The client secret is %1$s.", "ClientSecretVisibleHelp": "Use this secret to authenticate the client securely. It is only shown in full when it is created or rotated.", "ClientSecretMaskedHelp": "This secret is hidden after it is created or rotated. If you did not copy it, rotate the secret to generate a new one.", "ClientCredentialsExceptionPublicClient": "Public clients cannot use the client_credentials grant type", @@ -102,6 +103,7 @@ "SystemSettingOAuthEnableAClientCredentialsTitle": "Enable client credentials grant", "SystemSettingOAuthEnableRefreshTokenTitle": "Enable refresh tokens", "InvalidValueException": "Invalid value, it should be greater than 0.", + "InvalidNumericValueException": "Invalid value, it should be a numeric value, greater than 0.", "TokenEndpointException": "Token endpoint only accepts POST" } } diff --git a/tests/Integration/APITest.php b/tests/Integration/APITest.php index a4d7453..c593657 100644 --- a/tests/Integration/APITest.php +++ b/tests/Integration/APITest.php @@ -196,6 +196,41 @@ public function test_createClient_rejectsPublicClientCredentialsGrant() ); } + /** + * @dataProvider getInvalidRedirectUris + */ + public function test_createClient_rejectsInvalidRedirectUris($redirectUris) + { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid redirect_uri'); + + $this->api->createClient( + 'Invalid redirect client', + ['authorization_code', 'refresh_token'], + 'matomo:read', + $redirectUris, + 'Invalid redirect test', + 'confidential' + ); + } + + public function test_createClient_allowsRedirectUriWithUrlInQueryString() + { + $result = $this->api->createClient( + 'Valid redirect client', + ['authorization_code', 'refresh_token'], + 'matomo:read', + ['https://example.com/callback?redirect=https://other.example/path'], + 'Valid redirect test', + 'confidential' + ); + + $this->assertSame( + ['https://example.com/callback?redirect=https://other.example/path'], + $result['client']['redirect_uris'] + ); + } + public function test_rotateSecret_invalidatesPreviousSecret() { $result = $this->createConfidentialClient(); @@ -355,6 +390,24 @@ private function setSuperUser(): void FakeAccess::clearAccess(true); } + public function getInvalidRedirectUris(): array + { + return [ + ["https://example.com/callback\thttps://example.com/other"], + ["https://example.com/callback https://example.com/other"], + ["https://example.com/callback\\t"], + ["https://example.com/callback\\n"], + ["https://example.com/callbackhttps://example.org/other"], + ["https://example.com/callback,https://example.org/other"], + [" https://example.com/callback"], + ["https://example.com/callback "], + [["https://example.com/callback\t"]], + [["https://example.com/callback\\t"]], + [["https://example.com/callback https://example.com/other"]], + [["https://example.com/callbackhttps://example.org/other"]], + ]; + } + private function setRegularUser(): void { FakeAccess::clearAccess(false); diff --git a/tests/UI/OAuth2_spec.js b/tests/UI/OAuth2_spec.js index 9da2d0c..c09f8e5 100644 --- a/tests/UI/OAuth2_spec.js +++ b/tests/UI/OAuth2_spec.js @@ -60,12 +60,19 @@ describe("OAuth2Admin", function () { await page.waitForTimeout(100); } - async function submitForm() + async function submitForm(expectSecretMessage = false) { await page.waitForSelector('.oauth2-admin form button.btn', { visible: true }); await page.click('.oauth2-admin form button.btn'); await page.waitForNetworkIdle(); await page.waitForTimeout(300); + if (expectSecretMessage) { + const successHtml = await page.$eval('.success-msg-created', (element) => element.innerHTML); + + expect(successHtml).to.contain('The client secret is '); + expect(successHtml).to.contain('Copy the client secret now, it will not be shown again'); + } + await page.evaluate(function () { $('.success-msg-created').html('Client fixedValueForTest created'); }); @@ -133,7 +140,7 @@ describe("OAuth2Admin", function () { it('should create a confidential client and show the secret once', async function () { await page.goto(createUrl); await fillClientForm('Confidential UI client', 'Confidential', 'https://confidential.example/callback'); - await submitForm(); + await submitForm(true); await capturePage('create_confidential_success'); }); diff --git a/vue/dist/OAuth2.css b/vue/dist/OAuth2.css index 6360e83..04c14de 100644 --- a/vue/dist/OAuth2.css +++ b/vue/dist/OAuth2.css @@ -1 +1 @@ -.client-id-code[data-v-63146e50]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-63146e50]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-ba4724a2]{margin-bottom:0}.client-secret-code[data-v-ba4724a2]{word-break:break-word;white-space:pre-wrap;overflow-wrap:anywhere;margin:0} \ No newline at end of file +.client-id-code[data-v-63146e50]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-63146e50]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-eeb2da3e]{margin-bottom:0}.client-secret-code[data-v-eeb2da3e]{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 3167d5c..e7254bd 100644 --- a/vue/dist/OAuth2.umd.js +++ b/vue/dist/OAuth2.umd.js @@ -96,6 +96,17 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ({ +/***/ "0d56": +/***/ (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_eeb2da3e_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("46f8"); +/* 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_eeb2da3e_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_eeb2da3e_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + + +/***/ }), + /***/ "19dc": /***/ (function(module, exports) { @@ -103,28 +114,24 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__; /***/ }), -/***/ "5514": +/***/ "46f8": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), -/***/ "8bbf": -/***/ (function(module, exports) { +/***/ "5514": +/***/ (function(module, exports, __webpack_require__) { -module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; +// extracted by mini-css-extract-plugin /***/ }), -/***/ "9601": -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_ba4724a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cd6a"); -/* harmony import */ var _node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_ba4724a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_cli_service_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_vue_cli_service_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_vue_cli_service_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_cli_service_node_modules_vue_loader_v16_dist_index_js_ref_1_1_Edit_vue_vue_type_style_index_0_id_ba4724a2_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); -/* unused harmony reexport * */ +/***/ "8bbf": +/***/ (function(module, exports) { +module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; /***/ }), @@ -135,13 +142,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__; /***/ }), -/***/ "cd6a": -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin - -/***/ }), - /***/ "fae3": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -459,71 +459,71 @@ Listvue_type_script_lang_ts.render = Listvue_type_template_id_63146e50_scoped_tr Listvue_type_script_lang_ts.__scopeId = "data-v-63146e50" /* 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=ba4724a2&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=eeb2da3e&scoped=true -const Editvue_type_template_id_ba4724a2_scoped_true_withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-ba4724a2"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_1 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-eeb2da3e"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_1 = { class: "oauth2-admin oauth2-admin-edit" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_2 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_2 = { class: "ui-confirm", ref: "confirmRotateClient" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_3 = ["value"]; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_4 = ["value"]; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_5 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_3 = ["value"]; +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_4 = ["value"]; +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_5 = { key: 0 }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_6 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_6 = { class: "loadingPiwik" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_7 = /*#__PURE__*/Editvue_type_template_id_ba4724a2_scoped_true_withScopeId(() => /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_7 = /*#__PURE__*/Editvue_type_template_id_eeb2da3e_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_ba4724a2_scoped_true_hoisted_8 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_8 = { class: "row" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_9 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_9 = { class: "row" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_10 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_10 = { key: 0, class: "row" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_11 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_11 = { key: 1, class: "row oauth2-secret-head" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_12 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_12 = { class: "col s12" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_13 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_13 = { key: 2, class: "oauth2-secret-div form-group row matomo-form-field" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_14 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_14 = { class: "col s12 m6" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_15 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_15 = { class: "copy-secret-wrapper-div" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_16 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_16 = { key: 0, class: "client-secret-code" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_17 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_17 = { key: 1, class: "client-secret-code" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_18 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_18 = { class: "col s12 m6" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_19 = ["innerHTML"]; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_20 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_19 = ["innerHTML"]; +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_20 = { class: "row", name: "type" }; -const Editvue_type_template_id_ba4724a2_scoped_true_hoisted_21 = { +const Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_21 = { class: "row", name: "grantType" }; @@ -541,32 +541,32 @@ const _hoisted_25 = ["disabled"]; const _hoisted_26 = { class: "entityCancel" }; -function Editvue_type_template_id_ba4724a2_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { +function Editvue_type_template_id_eeb2da3e_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); const _directive_copy_to_clipboard = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("copy-to-clipboard"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.confirmRotateLabel), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.confirmRotateLabel), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, Editvue_type_template_id_ba4724a2_scoped_true_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, Editvue_type_template_id_ba4724a2_scoped_true_hoisted_4)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + }, null, 8, Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_4)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { "content-title": _ctx.contentTitle }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [_ctx.loading ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_6, [Editvue_type_template_id_ba4724a2_scoped_true_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("form", { + 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_eeb2da3e_scoped_true_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_6, [Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("form", { key: 1, onSubmit: _cache[8] || (_cache[8] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])((...args) => _ctx.submit && _ctx.submit(...args), ["prevent"])) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "name", modelValue: _ctx.form.name, "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.form.name = $event), "inline-help": _ctx.translate('OAuth2_AdminNameHelp'), title: _ctx.translate('OAuth2_AdminName') - }, null, 8, ["modelValue", "inline-help", "title"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "inline-help", "title"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "textarea", name: "description", modelValue: _ctx.form.description, @@ -578,19 +578,19 @@ function Editvue_type_template_id_ba4724a2_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_ba4724a2_scoped_true_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "inline-help", "title", "placeholder"])]), _ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "client_id", "model-value": _ctx.clientId, title: _ctx.translate('OAuth2_AdminClientId'), disabled: true - }, null, 8, ["model-value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSecretPanel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_ClientSecret')) + " ", 1), _ctx.canRegenerateSecret ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }, 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_eeb2da3e_scoped_true_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_ClientSecret')) + " ", 1), _ctx.canRegenerateSecret ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, onClick: _cache[2] || (_cache[2] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])((...args) => _ctx.rotateSecret && _ctx.rotateSecret(...args), ["prevent"])) - }, " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminRotateSecret')) + ") ", 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.showSecretPanel ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_15, [_ctx.visibleSecret ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1)])), [[_directive_copy_to_clipboard, {}]]) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1))])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, " (" + 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_eeb2da3e_scoped_true_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_15, [_ctx.visibleSecret ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1)])), [[_directive_copy_to_clipboard, {}]]) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("pre", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.displayedSecret), 1))])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "form-help", innerHTML: _ctx.$sanitize(_ctx.secretInlineHelp) - }, null, 8, Editvue_type_template_id_ba4724a2_scoped_true_hoisted_19)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_ba4724a2_scoped_true_hoisted_20, [!_ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Field, { + }, null, 8, Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_19)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Editvue_type_template_id_eeb2da3e_scoped_true_hoisted_20, [!_ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Field, { key: 0, uicontrol: "select", name: "type", @@ -606,7 +606,7 @@ function Editvue_type_template_id_ba4724a2_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_ba4724a2_scoped_true_hoisted_21, [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_eeb2da3e_scoped_true_hoisted_21, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "checkbox", options: _ctx.visibleGrantOptions, "var-type": "array", @@ -641,7 +641,7 @@ function Editvue_type_template_id_ba4724a2_scoped_true_render(_ctx, _cache, $pro _: 1 }, 8, ["content-title"])]); } -// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=ba4724a2&scoped=true +// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=template&id=eeb2da3e&scoped=true // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); @@ -805,7 +805,8 @@ function getDefaultForm(scopes) { }).then(response => { if (response !== null && response !== void 0 && response.secret) { this.visibleSecret = response.secret; - const message = this.translate('OAuth2_AdminRotatedNotification'); + const code = `${this.visibleSecret}`; + const message = `${this.translate('OAuth2_AdminRotatedNotification')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`; this.showNotification(`${message}`, 'success', 'transient'); } }).finally(() => { @@ -837,7 +838,8 @@ function getDefaultForm(scopes) { this.visibleSecret = response.secret || ''; const safeClientName = external_CoreHome_["Matomo"].helper.htmlEntities(response.client.name || ''); const clientMessage = this.isEditMode ? this.translate('OAuth2_AdminUpdated', safeClientName) : this.translate('OAuth2_AdminCreated', safeClientName); - const secretMessage = response.secret ? this.translate('OAuth2_ClientSecretHelp') : ''; + const code = `${this.visibleSecret}`; + const secretMessage = response.secret ? `${this.translate('OAuth2_ClientSecretHelp')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}` : ''; const message = [clientMessage, secretMessage].filter(Boolean).join(' '); this.$emit('saved', { client: response.client, @@ -900,8 +902,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=ba4724a2&scoped=true&lang=css -var Editvue_type_style_index_0_id_ba4724a2_scoped_true_lang_css = __webpack_require__("9601"); +// EXTERNAL MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?vue&type=style&index=0&id=eeb2da3e&scoped=true&lang=css +var Editvue_type_style_index_0_id_eeb2da3e_scoped_true_lang_css = __webpack_require__("0d56"); // CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Edit.vue @@ -909,8 +911,8 @@ var Editvue_type_style_index_0_id_ba4724a2_scoped_true_lang_css = __webpack_requ -Editvue_type_script_lang_ts.render = Editvue_type_template_id_ba4724a2_scoped_true_render -Editvue_type_script_lang_ts.__scopeId = "data-v-ba4724a2" +Editvue_type_script_lang_ts.render = Editvue_type_template_id_eeb2da3e_scoped_true_render +Editvue_type_script_lang_ts.__scopeId = "data-v-eeb2da3e" /* 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 eb3c014..26e55da 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/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?3897","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a32e","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?0502","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a589","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?4a8b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/index.ts","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?a2cc"],"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,mD;;;;;;;ACAA,uC;;;;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,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;;;;;;;;;ACDtB;AAAA;AAAA","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","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// extracted by mini-css-extract-plugin","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n 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 },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n 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\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"","import { render } from \"./List.vue?vue&type=template&id=63146e50&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=63146e50&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-63146e50\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n 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","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=63146e50&scoped=true&lang=css\""],"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/Edit.vue?d8d0","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?553d","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?3897","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?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","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?a2cc"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;Q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EP,wE;;ACLf;;;;;AAKG;;;ACLqB;AACF;;;;;;;;;ACDtB;AAAA;AAAA","file":"OAuth2.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=eeb2da3e&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n 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 },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n 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\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"","import { render } from \"./List.vue?vue&type=template&id=63146e50&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=63146e50&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-63146e50\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const 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 });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const 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=eeb2da3e&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=eeb2da3e&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-eeb2da3e\"\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","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=63146e50&scoped=true&lang=css\""],"sourceRoot":""} \ No newline at end of file diff --git a/vue/dist/OAuth2.umd.min.js b/vue/dist/OAuth2.umd.min.js index 5ec58d1..ed4f926 100644 --- a/vue/dist/OAuth2.umd.min.js +++ b/vue/dist/OAuth2.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["OAuth2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["OAuth2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,i){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/OAuth2/vue/dist/",i(i.s="fae3")}({"19dc":function(t,i){t.exports=e},5514:function(e,t,i){},"8bbf":function(e,i){e.exports=t},9601:function(e,t,i){"use strict";i("cd6a")},a5a2:function(e,t){e.exports=i},cd6a:function(e,t,i){},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return Oe})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(i.p=l[1])}var o=i("8bbf");const r={class:"oauth2-admin"};function a(e,t,i,n,l,a){const c=Object(o["resolveComponent"])("Oauth2ClientList"),s=Object(o["resolveComponent"])("Oauth2ClientEdit");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",r,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:1,"client-id":e.editedClientId,scopes:e.scopes,"initial-secret":e.secret,onCancel:e.showList,onSaved:e.onClientSaved},null,8,["client-id","scopes","initial-secret","onCancel","onSaved"])):(Object(o["openBlock"])(),Object(o["createBlock"])(c,{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 c=i("19dc");const s=e=>(Object(o["pushScopeId"])("data-v-63146e50"),e=e(),Object(o["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},u={class:"ui-confirm",ref:"confirmDeleteClient"},m=["value"],h=["value"],p={class:"ui-confirm",ref:"confirmToggleClient"},O=["value"],b=["value"],j=["innerHTML"],f={style:{width:"180px"}},A={key:0},y=["title"],_={class:"client-id-code"},v={class:"redirect-uri"},C={class:"created-at"},g=["onClick","title"],N=["onClick","title"],S=["onClick","title"],E={key:1},k={colspan:"9"},V={class:"tableActionBar"},B=s(()=>Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1));function D(e,t,i,n,l,r){const a=Object(o["resolveComponent"])("ContentBlock"),c=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",d,[Object(o["createElementVNode"])("div",u,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmDeleteLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,m),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,h)],512),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmToggleLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,O),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,b)],512),Object(o["createVNode"])(a,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.adminClientsDescription)},null,8,j),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminScope")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(o["createElementVNode"])("th",f,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",A,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.clients,t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.client_id},[Object(o["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(o["toDisplayString"])(t.name),9,y),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.typeOptions[t.type]),1),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.grant_types||[],t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t},Object(o["toDisplayString"])(e.getGrantTypeLabel(t)),1))),128))]),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.getScopeLabel(t)),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("code",_,Object(o["toDisplayString"])(t.client_id),1)]),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.redirect_uris||[],e=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:e},[Object(o["createElementVNode"])("code",v,Object(o["toDisplayString"])(e),1)]))),128))]),Object(o["createElementVNode"])("td",C,Object(o["toDisplayString"])(t.created_at),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("button",{class:Object(o["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(o["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,g),Object(o["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(o["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,N),Object(o["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(o["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,S)])]))),128))])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",E,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",k,Object(o["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[c]]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("a",{class:"createNewClient",onClick:t[0]||(t[0]=Object(o["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[B,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}const w="oauth2clientlist";var M=Object(o["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:c["ContentBlock"]},directives:{ContentTable:c["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",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=c["NotificationsStore"].show({message:e,context:t,id:w,type:null!==i?i:"toast"});setTimeout(()=>{c["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){c["NotificationsStore"].remove(w),c["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=c["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),c["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{c["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=c["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=c["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),c["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteClient,{yes:()=>{c["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:e.client_id}).then(i=>{null!==i&&void 0!==i&&i.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",t),"success"),this.$emit("deleted",e.client_id))})}})}}});i("fb14");M.render=D,M.__scopeId="data-v-63146e50";var T=M;const I=e=>(Object(o["pushScopeId"])("data-v-ba4724a2"),e=e(),Object(o["popScopeId"])(),e),U={class:"oauth2-admin oauth2-admin-edit"},x={class:"ui-confirm",ref:"confirmRotateClient"},H=["value"],P=["value"],L={key:0},G={class:"loadingPiwik"},R=I(()=>Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),$={class:"row"},z={class:"row"},q={key:0,class:"row"},F={key:1,class:"row oauth2-secret-head"},Y={class:"col s12"},W={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},X={class:"col s12 m6"},J={class:"copy-secret-wrapper-div"},K={key:0,class:"client-secret-code"},Q={key:1,class:"client-secret-code"},Z={class:"col s12 m6"},ee=["innerHTML"],te={class:"row",name:"type"},ie={class:"row",name:"grantType"},ne={class:"row",name:"scopes"},le={class:"row"},oe={class:"row"},re=["disabled"],ae={class:"entityCancel"};function ce(e,t,i,n,l,r){const a=Object(o["resolveComponent"])("Field"),c=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",U,[Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmRotateLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,H),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,P)],512),Object(o["createVNode"])(c,{"content-title":e.contentTitle},{default:Object(o["withCtx"])(()=>[e.loading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",L,[Object(o["createElementVNode"])("span",G,[R,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:1,onSubmit:t[8]||(t[8]=Object(o["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(o["createElementVNode"])("div",$,[Object(o["createVNode"])(a,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",z,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.description=t),rows:1,"ui-control-attributes":{style:"min-height: auto;"},"inline-help":e.translate("OAuth2_AdminDescriptionHelp"),title:e.translate("OAuth2_AdminDescription"),placeholder:e.translate("OAuth2_AdminDescriptionPlaceholder")},null,8,["modelValue","inline-help","title","placeholder"])]),e.isEditMode?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createVNode"])(a,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",F,[Object(o["createElementVNode"])("label",Y,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,onClick:t[2]||(t[2]=Object(o["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(o["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",W,[Object(o["createElementVNode"])("div",X,[Object(o["createElementVNode"])("div",J,[e.visibleSecret?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",K,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.displayedSecret),1)])),[[s,{}]]):(Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",Q,Object(o["toDisplayString"])(e.displayedSecret),1))])]),Object(o["createElementVNode"])("div",Z,[Object(o["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,ee)])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",te,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:1,uicontrol:"text",name:"type","model-value":e.typeOptions[e.form.type]||e.form.type,title:e.translate("OAuth2_AdminType"),disabled:!0},null,8,["model-value","title"])):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.type=t),title:e.translate("OAuth2_AdminType"),"inline-help":e.translate("OAuth2_AdminTypeHelp","",""),options:e.typeOptions},null,8,["modelValue","title","inline-help","options"]))]),Object(o["createElementVNode"])("div",ie,[Object(o["createVNode"])(a,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.grant_types=t),"inline-help":e.translate("OAuth2_AdminGrantTypesHelp"),title:e.translate("OAuth2_AdminClientGrants")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ne,[Object(o["createVNode"])(a,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",le,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.redirect_uris=t),placeholder:"https://example.com/callback","inline-help":e.translate("OAuth2_AdminRedirectUrisHelp"),title:e.translate("OAuth2_AdminRedirectUris")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",oe,[Object(o["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(o["toDisplayString"])(e.submitLabel),9,re)]),Object(o["createElementVNode"])("div",ae,[Object(o["createElementVNode"])("a",{onClick:t[7]||(t[7]=Object(o["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}var se=i("a5a2");const de="oauth2clientedit";function ue(e){const t=Object.keys(e||{})[0]||"";return{name:"",description:"",type:"confidential",grant_types:["authorization_code","client_credentials","refresh_token"],scope:t,redirect_uris:"",active:!0}}var me=Object(o["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:c["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:c["ContentBlock"],Field:se["Field"]},data(){const e={confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},t={authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")};return{loading:!1,confirmRotateLabel:"",typeOptions:e,grantOptions:t,form:ue(this.scopes),visibleSecret:this.initialSecret}},created(){this.init()},watch:{clientId(){this.init()},initialSecret(e){this.visibleSecret=e},"form.type":"onFormTypeChange"},computed:{isEditMode(){return"0"!==this.clientId},contentTitle(){return this.isEditMode?this.translate("OAuth2_AdminEditTitle"):this.translate("OAuth2_AdminCreateTitle")},submitLabel(){return this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminSave")},visibleGrantOptions(){if("public"===this.form.type){const e={};return this.grantOptions.authorization_code&&(e.authorization_code=this.grantOptions.authorization_code),this.grantOptions.refresh_token&&(e.refresh_token=this.grantOptions.refresh_token),e}return this.grantOptions},showSecretPanel(){return"confidential"===this.form.type&&(this.isEditMode||!!this.visibleSecret)},canRegenerateSecret(){return this.isEditMode&&"confidential"===this.form.type},displayedSecret(){return this.visibleSecret||"*************"},secretInlineHelp(){return this.visibleSecret?this.translate("OAuth2_ClientSecretVisibleHelp"):this.translate("OAuth2_ClientSecretMaskedHelp")}},methods:{init(){this.removeNotifications(),this.form=ue(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,c["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),c["Matomo"].helper.modalConfirm(this.$refs.confirmRotateClient,{yes:()=>{this.loading=!0,c["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=this.translate("OAuth2_AdminRotatedNotification");this.showNotification(`${t}`,"success","transient")}}).finally(()=>{this.loading=!1})}}))},submit(){if(this.removeNotifications(),!this.checkRequiredFieldsAreSet())return;this.loading=!0;const e={method:this.isEditMode?"OAuth2.updateClient":"OAuth2.createClient",name:this.form.name.trim(),description:this.form.description,type:this.form.type,grantTypes:this.form.grant_types,scope:this.form.scope,redirectUris:this.form.redirect_uris,active:this.form.active?"1":"0"};this.isEditMode&&(e.clientId=this.clientId),c["AjaxHelper"].fetch(e).then(e=>{this.visibleSecret=e.secret||"";const t=c["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=e.secret?this.translate("OAuth2_ClientSecretHelp"):"",l=[i,n].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),c["MatomoUrl"].updateHash(Object.assign(Object.assign({},c["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(){c["NotificationsStore"].remove(de),c["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=c["NotificationsStore"].show({message:e,context:t,id:de,type:null!==i?i:"toast"});setTimeout(()=>{c["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("9601");me.render=ce,me.__scopeId="data-v-ba4724a2";var he=me,pe=Object(o["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:T,Oauth2ClientEdit:he},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(o["watch"])(()=>c["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(c["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(){c["MatomoUrl"].updateHash(Object.assign(Object.assign({},c["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),c["MatomoUrl"].updateHash(Object.assign(Object.assign({},c["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},c["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",c["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}}});pe.render=a;var Oe=pe; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["OAuth2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["OAuth2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,i){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/OAuth2/vue/dist/",i(i.s="fae3")}({"0d56":function(e,t,i){"use strict";i("46f8")},"19dc":function(t,i){t.exports=e},"46f8":function(e,t,i){},5514:function(e,t,i){},"8bbf":function(e,i){e.exports=t},a5a2:function(e,t){e.exports=i},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return Oe})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(i.p=l[1])}var o=i("8bbf");const r={class:"oauth2-admin"};function a(e,t,i,n,l,a){const c=Object(o["resolveComponent"])("Oauth2ClientList"),s=Object(o["resolveComponent"])("Oauth2ClientEdit");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",r,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:1,"client-id":e.editedClientId,scopes:e.scopes,"initial-secret":e.secret,onCancel:e.showList,onSaved:e.onClientSaved},null,8,["client-id","scopes","initial-secret","onCancel","onSaved"])):(Object(o["openBlock"])(),Object(o["createBlock"])(c,{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 c=i("19dc");const s=e=>(Object(o["pushScopeId"])("data-v-63146e50"),e=e(),Object(o["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},u={class:"ui-confirm",ref:"confirmDeleteClient"},m=["value"],h=["value"],p={class:"ui-confirm",ref:"confirmToggleClient"},O=["value"],b=["value"],f=["innerHTML"],j={style:{width:"180px"}},A={key:0},y=["title"],_={class:"client-id-code"},v={class:"redirect-uri"},C={class:"created-at"},g=["onClick","title"],N=["onClick","title"],S=["onClick","title"],E={key:1},k={colspan:"9"},V={class:"tableActionBar"},D=s(()=>Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1));function B(e,t,i,n,l,r){const a=Object(o["resolveComponent"])("ContentBlock"),c=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",d,[Object(o["createElementVNode"])("div",u,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmDeleteLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,m),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,h)],512),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmToggleLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,O),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,b)],512),Object(o["createVNode"])(a,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.adminClientsDescription)},null,8,f),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminScope")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(o["createElementVNode"])("th",j,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",A,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.clients,t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.client_id},[Object(o["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(o["toDisplayString"])(t.name),9,y),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.typeOptions[t.type]),1),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.grant_types||[],t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t},Object(o["toDisplayString"])(e.getGrantTypeLabel(t)),1))),128))]),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.getScopeLabel(t)),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("code",_,Object(o["toDisplayString"])(t.client_id),1)]),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.redirect_uris||[],e=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:e},[Object(o["createElementVNode"])("code",v,Object(o["toDisplayString"])(e),1)]))),128))]),Object(o["createElementVNode"])("td",C,Object(o["toDisplayString"])(t.created_at),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("button",{class:Object(o["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(o["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,g),Object(o["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(o["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,N),Object(o["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(o["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,S)])]))),128))])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",E,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",k,Object(o["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[c]]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("a",{class:"createNewClient",onClick:t[0]||(t[0]=Object(o["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[D,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}const w="oauth2clientlist";var M=Object(o["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:c["ContentBlock"]},directives:{ContentTable:c["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",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=c["NotificationsStore"].show({message:e,context:t,id:w,type:null!==i?i:"toast"});setTimeout(()=>{c["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){c["NotificationsStore"].remove(w),c["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=c["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),c["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{c["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=c["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=c["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),c["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteClient,{yes:()=>{c["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:e.client_id}).then(i=>{null!==i&&void 0!==i&&i.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",t),"success"),this.$emit("deleted",e.client_id))})}})}}});i("fb14");M.render=B,M.__scopeId="data-v-63146e50";var T=M;const I=e=>(Object(o["pushScopeId"])("data-v-eeb2da3e"),e=e(),Object(o["popScopeId"])(),e),U={class:"oauth2-admin oauth2-admin-edit"},x={class:"ui-confirm",ref:"confirmRotateClient"},H=["value"],P=["value"],L={key:0},$={class:"loadingPiwik"},G=I(()=>Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),R={class:"row"},z={class:"row"},q={key:0,class:"row"},F={key:1,class:"row oauth2-secret-head"},Y={class:"col s12"},W={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},X={class:"col s12 m6"},J={class:"copy-secret-wrapper-div"},K={key:0,class:"client-secret-code"},Q={key:1,class:"client-secret-code"},Z={class:"col s12 m6"},ee=["innerHTML"],te={class:"row",name:"type"},ie={class:"row",name:"grantType"},ne={class:"row",name:"scopes"},le={class:"row"},oe={class:"row"},re=["disabled"],ae={class:"entityCancel"};function ce(e,t,i,n,l,r){const a=Object(o["resolveComponent"])("Field"),c=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",U,[Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmRotateLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,H),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,P)],512),Object(o["createVNode"])(c,{"content-title":e.contentTitle},{default:Object(o["withCtx"])(()=>[e.loading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",L,[Object(o["createElementVNode"])("span",$,[G,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:1,onSubmit:t[8]||(t[8]=Object(o["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(o["createElementVNode"])("div",R,[Object(o["createVNode"])(a,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",z,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.description=t),rows:1,"ui-control-attributes":{style:"min-height: auto;"},"inline-help":e.translate("OAuth2_AdminDescriptionHelp"),title:e.translate("OAuth2_AdminDescription"),placeholder:e.translate("OAuth2_AdminDescriptionPlaceholder")},null,8,["modelValue","inline-help","title","placeholder"])]),e.isEditMode?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createVNode"])(a,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",F,[Object(o["createElementVNode"])("label",Y,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,onClick:t[2]||(t[2]=Object(o["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(o["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",W,[Object(o["createElementVNode"])("div",X,[Object(o["createElementVNode"])("div",J,[e.visibleSecret?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",K,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.displayedSecret),1)])),[[s,{}]]):(Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",Q,Object(o["toDisplayString"])(e.displayedSecret),1))])]),Object(o["createElementVNode"])("div",Z,[Object(o["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,ee)])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",te,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:1,uicontrol:"text",name:"type","model-value":e.typeOptions[e.form.type]||e.form.type,title:e.translate("OAuth2_AdminType"),disabled:!0},null,8,["model-value","title"])):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.type=t),title:e.translate("OAuth2_AdminType"),"inline-help":e.translate("OAuth2_AdminTypeHelp","",""),options:e.typeOptions},null,8,["modelValue","title","inline-help","options"]))]),Object(o["createElementVNode"])("div",ie,[Object(o["createVNode"])(a,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.grant_types=t),"inline-help":e.translate("OAuth2_AdminGrantTypesHelp"),title:e.translate("OAuth2_AdminClientGrants")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ne,[Object(o["createVNode"])(a,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",le,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.redirect_uris=t),placeholder:"https://example.com/callback","inline-help":e.translate("OAuth2_AdminRedirectUrisHelp"),title:e.translate("OAuth2_AdminRedirectUris")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",oe,[Object(o["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(o["toDisplayString"])(e.submitLabel),9,re)]),Object(o["createElementVNode"])("div",ae,[Object(o["createElementVNode"])("a",{onClick:t[7]||(t[7]=Object(o["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}var se=i("a5a2");const de="oauth2clientedit";function ue(e){const t=Object.keys(e||{})[0]||"";return{name:"",description:"",type:"confidential",grant_types:["authorization_code","client_credentials","refresh_token"],scope:t,redirect_uris:"",active:!0}}var me=Object(o["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:c["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:c["ContentBlock"],Field:se["Field"]},data(){const e={confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},t={authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")};return{loading:!1,confirmRotateLabel:"",typeOptions:e,grantOptions:t,form:ue(this.scopes),visibleSecret:this.initialSecret}},created(){this.init()},watch:{clientId(){this.init()},initialSecret(e){this.visibleSecret=e},"form.type":"onFormTypeChange"},computed:{isEditMode(){return"0"!==this.clientId},contentTitle(){return this.isEditMode?this.translate("OAuth2_AdminEditTitle"):this.translate("OAuth2_AdminCreateTitle")},submitLabel(){return this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminSave")},visibleGrantOptions(){if("public"===this.form.type){const e={};return this.grantOptions.authorization_code&&(e.authorization_code=this.grantOptions.authorization_code),this.grantOptions.refresh_token&&(e.refresh_token=this.grantOptions.refresh_token),e}return this.grantOptions},showSecretPanel(){return"confidential"===this.form.type&&(this.isEditMode||!!this.visibleSecret)},canRegenerateSecret(){return this.isEditMode&&"confidential"===this.form.type},displayedSecret(){return this.visibleSecret||"*************"},secretInlineHelp(){return this.visibleSecret?this.translate("OAuth2_ClientSecretVisibleHelp"):this.translate("OAuth2_ClientSecretMaskedHelp")}},methods:{init(){this.removeNotifications(),this.form=ue(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,c["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),c["Matomo"].helper.modalConfirm(this.$refs.confirmRotateClient,{yes:()=>{this.loading=!0,c["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=`${this.visibleSecret}`,i=`${this.translate("OAuth2_AdminRotatedNotification")}
${this.translate("OAuth2_ClientSecretDisplayedNotification",t)}`;this.showNotification(`${i}`,"success","transient")}}).finally(()=>{this.loading=!1})}}))},submit(){if(this.removeNotifications(),!this.checkRequiredFieldsAreSet())return;this.loading=!0;const e={method:this.isEditMode?"OAuth2.updateClient":"OAuth2.createClient",name:this.form.name.trim(),description:this.form.description,type:this.form.type,grantTypes:this.form.grant_types,scope:this.form.scope,redirectUris:this.form.redirect_uris,active:this.form.active?"1":"0"};this.isEditMode&&(e.clientId=this.clientId),c["AjaxHelper"].fetch(e).then(e=>{this.visibleSecret=e.secret||"";const t=c["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=`${this.visibleSecret}`,l=e.secret?`${this.translate("OAuth2_ClientSecretHelp")}
${this.translate("OAuth2_ClientSecretDisplayedNotification",n)}`:"",o=[i,l].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),c["MatomoUrl"].updateHash(Object.assign(Object.assign({},c["MatomoUrl"].hashParsed.value),{},{idClient:e.client.client_id})),setTimeout(()=>{this.showNotification(`${o}`,"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(){c["NotificationsStore"].remove(de),c["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=c["NotificationsStore"].show({message:e,context:t,id:de,type:null!==i?i:"toast"});setTimeout(()=>{c["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("0d56");me.render=ce,me.__scopeId="data-v-eeb2da3e";var he=me,pe=Object(o["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:T,Oauth2ClientEdit:he},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(o["watch"])(()=>c["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(c["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(){c["MatomoUrl"].updateHash(Object.assign(Object.assign({},c["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),c["MatomoUrl"].updateHash(Object.assign(Object.assign({},c["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},c["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",c["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}}});pe.render=a;var Oe=pe; /*! * Matomo - free/libre analytics platform * diff --git a/vue/dist/OAuth2.umd.min.js.map b/vue/dist/OAuth2.umd.min.js.map index f588121..0444afa 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/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?a2cc"],"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","confirmDeleteLabel","role","type","translate","confirmToggleLabel","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","directives","ContentTable","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","confirmDeleteClient","deleted","render","__scopeId","confirmRotateLabel","contentTitle","loading","submit","uicontrol","form","inline-help","rows","ui-control-attributes","placeholder","model-value","disabled","showSecretPanel","canRegenerateSecret","rotateSecret","visibleSecret","displayedSecret","secretInlineHelp","options","visibleGrantOptions","var-type","submitLabel","getDefaultForm","firstScope","keys","initialSecret","default","CopyToClipboard","Field","grantOptions","init","watch","newSecret","filtered","join","finally","newType","includes","filter","confirmRotateClient","checkRequiredFieldsAreSet","params","trim","grantTypes","redirectUris","clientMessage","secretMessage","Boolean","updateHash","hashParsed","idClient","errorMessage","showErrorFieldNotProvidedNotification","notificationInstanceId","initialClients","Oauth2ClientList","Oauth2ClientEdit","secretClientId","initState","payload","index","findIndex","push","splice","sort","left","right","leftTime","updated_at","Date","getTime","rightTime","localeCompare","updatedClient"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAC7C,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,WAAY,CAAE,oBAAqBJ,GACjB,kBAAZC,QACdA,QAAQ,UAAYD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAEzEJ,EAAK,UAAYC,EAAQD,EAAK,YAAaA,EAAK,OAAQA,EAAK,sBAR/D,CASoB,qBAATO,KAAuBA,KAAOC,MAAO,SAASC,EAAmCC,EAAmCC,GAC/H,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUZ,QAGnC,IAAIC,EAASS,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHd,QAAS,IAUV,OANAe,EAAQH,GAAUI,KAAKf,EAAOD,QAASC,EAAQA,EAAOD,QAASW,GAG/DV,EAAOa,GAAI,EAGJb,EAAOD,QA0Df,OArDAW,EAAoBM,EAAIF,EAGxBJ,EAA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J,OAAOH,EAAO,EAAGa,GAC9BpN,KAAKqD,QAAU,IAAIrD,KAAKqD,YAG5BsD,SAAU,CACR,aACE,QAAS3G,KAAK+C,mBC/HpB,GAAO0F,OAASA,EAED;;;;;;uCCLf","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__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n 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 },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n 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\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","import { render } from \"./List.vue?vue&type=template&id=63146e50&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=63146e50&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-63146e50\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n 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","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=63146e50&scoped=true&lang=css\""],"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/Edit.vue?d8d0","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?a2cc"],"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","confirmDeleteLabel","role","type","translate","confirmToggleLabel","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","directives","ContentTable","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","confirmDeleteClient","deleted","render","__scopeId","confirmRotateLabel","contentTitle","loading","submit","uicontrol","form","inline-help","rows","ui-control-attributes","placeholder","model-value","disabled","showSecretPanel","canRegenerateSecret","rotateSecret","visibleSecret","displayedSecret","secretInlineHelp","options","visibleGrantOptions","var-type","submitLabel","getDefaultForm","firstScope","keys","initialSecret","default","CopyToClipboard","Field","grantOptions","init","watch","newSecret","filtered","join","finally","newType","includes","filter","confirmRotateClient","code","checkRequiredFieldsAreSet","params","trim","grantTypes","redirectUris","clientMessage","secretMessage","Boolean","updateHash","hashParsed","idClient","errorMessage","showErrorFieldNotProvidedNotification","notificationInstanceId","initialClients","Oauth2ClientList","Oauth2ClientEdit","secretClientId","initState","payload","index","findIndex","push","splice","sort","left","right","leftTime","updated_at","Date","getTime","rightTime","localeCompare","updatedClient"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAC7C,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,WAAY,CAAE,oBAAqBJ,GACjB,kBAAZC,QACdA,QAAQ,UAAYD,EAAQG,QAAQ,YAAaA,QAAQ,OAAQA,QAAQ,qBAEzEJ,EAAK,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Aa,IAAIC,KAAKJ,EAAKG,YAAYE,UAAY,EACnEC,EAAYL,EAAME,WAAa,IAAIC,KAAKH,EAAME,YAAYE,UAAY,EAE5E,OAAIC,IAAcJ,EACTI,EAAYJ,EAGdF,EAAK/L,KAAKsM,cAAcN,EAAMhM,QAEvCd,KAAKkD,OAASqJ,EAAQrJ,QAAU,GAChClD,KAAKqM,eAAiBE,EAAQrJ,OAASqJ,EAAQ5H,OAAOC,UAAY,IAEpE,gBAAgBqD,GACdjI,KAAKkD,OAAS,GACVlD,KAAKqM,iBAAmBpE,IAC1BjI,KAAKqM,eAAiB,IAExBrM,KAAKqD,QAAUrD,KAAKqD,QAAQ4H,OAAQtG,GAAWA,EAAOC,YAAcqD,IAEtE,gBAAgBoF,GACd,MAAMb,EAAQxM,KAAKqD,QAAQoJ,UACxB9H,GAAWA,EAAOC,YAAcyI,EAAczI,YAElC,IAAX4H,IAIJxM,KAAKqD,QAAQsJ,OAAOH,EAAO,EAAGa,GAC9BrN,KAAKqD,QAAU,IAAIrD,KAAKqD,YAG5BsD,SAAU,CACR,aACE,QAAS3G,KAAK+C,mBC/HpB,GAAO0F,OAASA,EAED;;;;;;uCCLf","file":"OAuth2.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=eeb2da3e&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n 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 },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n 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\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","import { render } from \"./List.vue?vue&type=template&id=63146e50&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=63146e50&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-63146e50\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const 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 });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const 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=eeb2da3e&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=eeb2da3e&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-eeb2da3e\"\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","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=63146e50&scoped=true&lang=css\""],"sourceRoot":""} \ No newline at end of file diff --git a/vue/src/OAuthClients/Edit.vue b/vue/src/OAuthClients/Edit.vue index 239b740..ca127c5 100644 --- a/vue/src/OAuthClients/Edit.vue +++ b/vue/src/OAuthClients/Edit.vue @@ -367,7 +367,8 @@ export default defineComponent({ }).then((response) => { if (response?.secret) { this.visibleSecret = response.secret; - const message = this.translate('OAuth2_AdminRotatedNotification'); + const code = `${this.visibleSecret}`; + const message = `${this.translate('OAuth2_AdminRotatedNotification')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}`; this.showNotification(`${message}`, 'success', 'transient'); } }).finally(() => { @@ -404,8 +405,9 @@ export default defineComponent({ const clientMessage = this.isEditMode ? this.translate('OAuth2_AdminUpdated', safeClientName) : this.translate('OAuth2_AdminCreated', safeClientName); + const code = `${this.visibleSecret}`; const secretMessage = response.secret - ? this.translate('OAuth2_ClientSecretHelp') + ? `${this.translate('OAuth2_ClientSecretHelp')}
${this.translate('OAuth2_ClientSecretDisplayedNotification', code)}` : ''; const message = [clientMessage, secretMessage].filter(Boolean).join(' '); From b53fffa496f10b04a2b884f2284cff1703685ea8 Mon Sep 17 00:00:00 2001 From: Altamash Shaikh Date: Fri, 8 May 2026 08:19:59 +0530 Subject: [PATCH 2/2] Removed unwanted translation key --- OAuth2.php | 1 - 1 file changed, 1 deletion(-) diff --git a/OAuth2.php b/OAuth2.php index bfda5f2..58c0b04 100644 --- a/OAuth2.php +++ b/OAuth2.php @@ -166,7 +166,6 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'OAuth2_ClientSecretMaskedHelp'; $translationKeys[] = 'OAuth2_ClientSecretVisibleHelp'; $translationKeys[] = 'OAuth2_ClientSecretDisplayedNotification'; - $translationKeys[] = 'OAuth2_InvalidOrExpiredAccessToken'; $translationKeys[] = 'OAuth2_AdminDescriptionPlaceholder'; $translationKeys[] = 'OAuth2_AdminRotatedNotification'; $translationKeys[] = 'OAuth2_ScopeSuperUserShort';