diff --git a/CHANGELOG.md b/CHANGELOG.md index 5003eb9..1eb6607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +5.0.2 - 2026-04-27 +- Added code to show scope in the list view + 5.0.1 - 2026-04-17 - Fixes README.md diff --git a/OAuth2.php b/OAuth2.php index 23ca7c7..e98ea38 100644 --- a/OAuth2.php +++ b/OAuth2.php @@ -15,6 +15,7 @@ use Piwik\Db; use Piwik\DbHelper; use Piwik\Option; +use Piwik\Piwik; use Piwik\Plugin; use Piwik\Plugins\OAuth2\Access\OAuth2Access; use Piwik\Plugins\OAuth2\Auth\Oauth2Auth; @@ -27,6 +28,17 @@ class OAuth2 extends Plugin public const OAUTH2_PRIVATE_OPTION_KEY = 'oauth2_private'; public const OAUTH2_PUBLIC_OPTION_KEY = 'oauth2_public'; public const OAUTH2_ENCRYPTION_OPTION_KEY = 'oauth2_encryption'; + + public static function getScopeDescriptions(): array + { + return [ + 'matomo:read' => Piwik::translate('OAuth2_ScopeReadDescription'), + 'matomo:write' => Piwik::translate('OAuth2_ScopeWriteDescription'), + 'matomo:admin' => Piwik::translate('OAuth2_ScopeAdminDescription'), + 'matomo:superuser' => Piwik::translate('OAuth2_ScopeSuperUserDescription'), + ]; + } + public function registerEvents() { return [ @@ -155,6 +167,10 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'OAuth2_ClientSecretVisibleHelp'; $translationKeys[] = 'OAuth2_AdminDescriptionPlaceholder'; $translationKeys[] = 'OAuth2_AdminRotatedNotification'; + $translationKeys[] = 'OAuth2_ScopeSuperUserShort'; + $translationKeys[] = 'UsersManager_PrivView'; + $translationKeys[] = 'UsersManager_PrivWrite'; + $translationKeys[] = 'UsersManager_PrivAdmin'; } public function getTablesInstalled(&$allTablesInstalled) diff --git a/Repositories/ScopeRepository.php b/Repositories/ScopeRepository.php index 2d09aa5..6f6c363 100644 --- a/Repositories/ScopeRepository.php +++ b/Repositories/ScopeRepository.php @@ -15,6 +15,7 @@ use Matomo\Dependencies\Oauth2\League\OAuth2\Server\Repositories\ScopeRepositoryInterface; use Piwik\Piwik; use Piwik\Plugins\OAuth2\Entities\ClientEntity; +use Piwik\Plugins\OAuth2\OAuth2; use Piwik\Plugins\OAuth2\Entities\ScopeEntity; use Piwik\Plugins\OAuth2\SystemSettings; @@ -29,12 +30,7 @@ public function __construct(SystemSettings $settings) public static function getScopeDescriptions(): array { - return [ - 'matomo:read' => Piwik::translate('OAuth2_ScopeReadDescription'), - 'matomo:write' => Piwik::translate('OAuth2_ScopeWriteDescription'), - 'matomo:admin' => Piwik::translate('OAuth2_ScopeAdminDescription'), - 'matomo:superuser' => Piwik::translate('OAuth2_ScopeSuperUserDescription'), - ]; + return OAuth2::getScopeDescriptions(); } public function getScopeEntityByIdentifier(string $identifier): ?ScopeEntityInterface diff --git a/SystemSettings.php b/SystemSettings.php index e657e9c..c5dac57 100644 --- a/SystemSettings.php +++ b/SystemSettings.php @@ -10,7 +10,6 @@ namespace Piwik\Plugins\OAuth2; use Piwik\Piwik; -use Piwik\Plugins\OAuth2\Repositories\ScopeRepository; use Piwik\Settings\FieldConfig; use Piwik\Settings\Plugin\SystemSettings as BaseSystemSettings; use Piwik\Settings\Setting; @@ -73,7 +72,7 @@ protected function init() $field->title = Piwik::translate('OAuth2_SystemSettingOAuthEnableRefreshTokenTitle'); }); - $scopes = ScopeRepository::getScopeDescriptions(); + $scopes = OAuth2::getScopeDescriptions(); $defaultScopes = $scopes; unset($defaultScopes['matomo:superuser']); $this->defaultScopes = $this->makeSetting('defaultScopes', array_keys($defaultScopes), FieldConfig::TYPE_ARRAY, function (FieldConfig $field) use ($scopes) { diff --git a/lang/en.json b/lang/en.json index 194e77b..a793983 100644 --- a/lang/en.json +++ b/lang/en.json @@ -88,6 +88,7 @@ "ScopeWriteDescription": "Matomo write level access", "ScopeAdminDescription": "Matomo admin level access", "ScopeSuperUserDescription": "Matomo superuser level access", + "ScopeSuperUserShort": "Superuser", "SystemSettingOAuthAccessTokenLifetimeTitle": "Access token lifetime (seconds)", "SystemSettingOAuthAccessTokenLifetimeDescription": "Define how long an access token remains valid after it is issued.", "SystemSettingOAuthRefreshTokenLifetimeTitle": "Refresh token lifetime (seconds)", diff --git a/plugin.json b/plugin.json index cbc7069..bc15c22 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "OAuth2", "description": "Provide secure access to the Matomo API using scoped permissions. No static credentials.", - "version": "5.0.1", + "version": "5.0.2", "theme": false, "require": { "php": ">=8.1.0", diff --git a/stylesheets/oauth2.less b/stylesheets/oauth2.less index 2af85f6..6567ac0 100644 --- a/stylesheets/oauth2.less +++ b/stylesheets/oauth2.less @@ -1,3 +1,7 @@ +#content.admin:has(.oauth2-admin) { + max-width: unset !important; +} + #oauth2AuthorizePage { display: flex; width: 100%; @@ -161,4 +165,4 @@ #footerLinks { margin-top: 1rem; } -} \ No newline at end of file +} diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_admin_page.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_admin_page.png index c566c37..72b0225 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_admin_page.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_admin_page.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_page.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_page.png index 8d91ea3..bfa05f0 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_page.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_page.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_validation.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_validation.png index 7930735..55c2173 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_validation.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_client_validation.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_confidential_success.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_confidential_success.png index edbf157..8aafa92 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_confidential_success.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_confidential_success.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_public_success.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_public_success.png index 8fd4aa2..02d3798 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_create_public_success.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_create_public_success.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_edit_client_page.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_edit_client_page.png index a32a337..b77c45d 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_edit_client_page.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_edit_client_page.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_secret_not_shown_again.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_secret_not_shown_again.png index a32a337..b77c45d 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_secret_not_shown_again.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_secret_not_shown_again.png differ diff --git a/tests/UI/expected-ui-screenshots/OAuth2Admin_system_settings.png b/tests/UI/expected-ui-screenshots/OAuth2Admin_system_settings.png index 6141180..aeb6514 100644 Binary files a/tests/UI/expected-ui-screenshots/OAuth2Admin_system_settings.png and b/tests/UI/expected-ui-screenshots/OAuth2Admin_system_settings.png differ diff --git a/vue/dist/OAuth2.css b/vue/dist/OAuth2.css index ae887e2..62beb70 100644 --- a/vue/dist/OAuth2.css +++ b/vue/dist/OAuth2.css @@ -1 +1 @@ -.client-id-code[data-v-4e1cf580]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-4e1cf580]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-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-20798176]{max-width:125px;display:inline-block;word-wrap:break-word}.redirect-uri[data-v-20798176]{max-width:250px;display:inline-block;word-wrap:break-word}.oauth2-secret-head[data-v-ba4724a2]{margin-bottom:0}.client-secret-code[data-v-ba4724a2]{word-break:break-word;white-space:pre-wrap;overflow-wrap:anywhere;margin:0} \ No newline at end of file diff --git a/vue/dist/OAuth2.umd.js b/vue/dist/OAuth2.umd.js index 91e2bd6..a5d15e2 100644 --- a/vue/dist/OAuth2.umd.js +++ b/vue/dist/OAuth2.umd.js @@ -96,17 +96,6 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ({ -/***/ "05ab": -/***/ (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_List_vue_vue_type_style_index_0_id_4e1cf580_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5e25"); -/* 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_List_vue_vue_type_style_index_0_id_4e1cf580_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_List_vue_vue_type_style_index_0_id_4e1cf580_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); -/* unused harmony reexport * */ - - -/***/ }), - /***/ "19dc": /***/ (function(module, exports) { @@ -114,11 +103,22 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__; /***/ }), -/***/ "5e25": +/***/ "556e": /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin +/***/ }), + +/***/ "7066": +/***/ (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_List_vue_vue_type_style_index_0_id_20798176_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("556e"); +/* 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_List_vue_vue_type_style_index_0_id_20798176_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_List_vue_vue_type_style_index_0_id_20798176_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__); +/* unused harmony reexport * */ + + /***/ }), /***/ "8bbf": @@ -182,7 +182,7 @@ if (typeof window !== 'undefined') { // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// 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/Manage.vue?vue&type=template&id=f7d6db3a +// 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/Manage.vue?vue&type=template&id=3b7774ee const _hoisted_1 = { class: "oauth2-admin" @@ -193,11 +193,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [!_ctx.isEditMode ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Oauth2ClientList, { key: 0, clients: _ctx.clients, + scopes: _ctx.scopes, onCreate: _ctx.createClient, onEdit: _ctx.editClient, onDeleted: _ctx.onClientDeleted, onUpdated: _ctx.onClientUpdated - }, null, 8, ["clients", "onCreate", "onEdit", "onDeleted", "onUpdated"])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Oauth2ClientEdit, { + }, null, 8, ["clients", "scopes", "onCreate", "onEdit", "onDeleted", "onUpdated"])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Oauth2ClientEdit, { key: 1, "client-id": _ctx.editedClientId, scopes: _ctx.scopes, @@ -206,15 +207,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { onSaved: _ctx.onClientSaved }, null, 8, ["client-id", "scopes", "initial-secret", "onCancel", "onSaved"]))]); } -// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?vue&type=template&id=f7d6db3a +// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?vue&type=template&id=3b7774ee // EXTERNAL MODULE: external "CoreHome" var external_CoreHome_ = __webpack_require__("19dc"); -// 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/List.vue?vue&type=template&id=4e1cf580&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/List.vue?vue&type=template&id=20798176&scoped=true -const _withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-4e1cf580"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); -const Listvue_type_template_id_4e1cf580_scoped_true_hoisted_1 = { +const _withScopeId = n => (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["pushScopeId"])("data-v-20798176"), n = n(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["popScopeId"])(), n); +const Listvue_type_template_id_20798176_scoped_true_hoisted_1 = { class: "oauth2-admin oauth2-admin-list" }; const _hoisted_2 = { @@ -254,7 +255,7 @@ const _hoisted_17 = { key: 1 }; const _hoisted_18 = { - colspan: "8" + colspan: "9" }; const _hoisted_19 = { class: "tableActionBar" @@ -262,10 +263,10 @@ const _hoisted_19 = { const _hoisted_20 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, null, -1)); -function Listvue_type_template_id_4e1cf580_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { +function Listvue_type_template_id_20798176_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); const _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Listvue_type_template_id_4e1cf580_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.confirmDeleteLabel), 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", Listvue_type_template_id_20798176_scoped_true_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.confirmDeleteLabel), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') @@ -285,12 +286,16 @@ function Listvue_type_template_id_4e1cf580_scoped_true_render(_ctx, _cache, $pro "content-title": _ctx.translate('OAuth2_AdminHeading'), feature: _ctx.translate('OAuth2_AdminHeading') }, { - default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientsDescriptions')), 1), 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"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminName')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientType')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientGrants')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientStatus')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientId')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientRedirects')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientCreatedAt')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", _hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientActions')), 1)])]), _ctx.clients.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", _hoisted_9, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.clients, client => { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientsDescriptions')), 1), 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"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminName')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientType')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientGrants')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminScope')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientStatus')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientId')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientRedirects')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientCreatedAt')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", _hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('OAuth2_AdminClientActions')), 1)])]), _ctx.clients.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tbody", _hoisted_9, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.clients, client => { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { key: client.client_id }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { title: _ctx.$sanitize(client.description) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(client.name), 9, _hoisted_10), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.typeOptions[client.type]), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])((client.grant_types || []).join(', ')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(client.active ? _ctx.translate('OAuth2_AdminActive') : _ctx.translate('OAuth2_AdminDisabled')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("code", _hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(client.client_id), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(client.redirect_uris || [], uri => { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(client.name), 9, _hoisted_10), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.typeOptions[client.type]), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(client.grant_types || [], grantType => { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: grantType + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getGrantTypeLabel(grantType)), 1); + }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getScopeLabel(client)), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(client.active ? _ctx.translate('OAuth2_AdminActive') : _ctx.translate('OAuth2_AdminDisabled')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("code", _hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(client.client_id), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(client.redirect_uris || [], uri => { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { key: uri }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("code", _hoisted_12, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(uri), 1)]); @@ -314,7 +319,7 @@ function Listvue_type_template_id_4e1cf580_scoped_true_render(_ctx, _cache, $pro _: 1 }, 8, ["content-title", "feature"])]); } -// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/List.vue?vue&type=template&id=4e1cf580&scoped=true +// CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/List.vue?vue&type=template&id=20798176&scoped=true // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--15-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--1-1!./plugins/OAuth2/vue/src/OAuthClients/List.vue?vue&type=script&lang=ts @@ -326,6 +331,10 @@ const notificationId = 'oauth2clientlist'; clients: { type: Array, required: true + }, + scopes: { + type: Object, + required: true } }, emits: ['create', 'edit', 'deleted', 'updated'], @@ -342,10 +351,24 @@ const notificationId = 'oauth2clientlist'; 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') } }; }, methods: { + getShortScopeLabel(scope) { + const shortScopeLabels = { + '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 shortScopeLabels[scope] || this.scopes[scope] || scope; + }, showNotification(message, context, type = null) { const instanceId = external_CoreHome_["NotificationsStore"].show({ message, @@ -361,6 +384,17 @@ const notificationId = 'oauth2clientlist'; external_CoreHome_["NotificationsStore"].remove(notificationId); external_CoreHome_["NotificationsStore"].remove('ajaxHelper'); }, + getScopeLabel(client) { + var _client$scopes; + const scope = (_client$scopes = client.scopes) === null || _client$scopes === void 0 ? void 0 : _client$scopes[0]; + if (!scope) { + return ''; + } + return this.getShortScopeLabel(scope); + }, + getGrantTypeLabel(grantType) { + return this.grantTypeOptions[grantType] || grantType; + }, toggleClientStatus(client) { const safeClientName = external_CoreHome_["Matomo"].helper.htmlEntities(client.name || client.client_id); this.confirmToggleLabel = client.active ? this.translate('OAuth2_AdminPauseConfirm', safeClientName) : this.translate('OAuth2_AdminResumeConfirm', safeClientName); @@ -403,8 +437,8 @@ const notificationId = 'oauth2clientlist'; })); // CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/List.vue?vue&type=script&lang=ts -// EXTERNAL MODULE: ./plugins/OAuth2/vue/src/OAuthClients/List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css -var Listvue_type_style_index_0_id_4e1cf580_scoped_true_lang_css = __webpack_require__("05ab"); +// EXTERNAL MODULE: ./plugins/OAuth2/vue/src/OAuthClients/List.vue?vue&type=style&index=0&id=20798176&scoped=true&lang=css +var Listvue_type_style_index_0_id_20798176_scoped_true_lang_css = __webpack_require__("7066"); // CONCATENATED MODULE: ./plugins/OAuth2/vue/src/OAuthClients/List.vue @@ -412,8 +446,8 @@ var Listvue_type_style_index_0_id_4e1cf580_scoped_true_lang_css = __webpack_requ -Listvue_type_script_lang_ts.render = Listvue_type_template_id_4e1cf580_scoped_true_render -Listvue_type_script_lang_ts.__scopeId = "data-v-4e1cf580" +Listvue_type_script_lang_ts.render = Listvue_type_template_id_20798176_scoped_true_render +Listvue_type_script_lang_ts.__scopeId = "data-v-20798176" /* 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 diff --git a/vue/dist/OAuth2.umd.js.map b/vue/dist/OAuth2.umd.js.map index e4a6c4f..0cbc3f7 100644 --- a/vue/dist/OAuth2.umd.js.map +++ b/vue/dist/OAuth2.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?542c","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?441d","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a32e","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?0502","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a589","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?4a8b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/index.ts","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QA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2.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// extracted by mini-css-extract-plugin","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// extracted by mini-css-extract-plugin","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n };\n },\n methods: {\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const instanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n\n setTimeout(() => {\n NotificationsStore.scrollToNotification(instanceId);\n }, 200);\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n toggleClientStatus(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmToggleLabel = client.active\n ? this.translate('OAuth2_AdminPauseConfirm', safeClientName)\n : this.translate('OAuth2_AdminResumeConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmToggleClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.setClientActive',\n clientId: client.client_id,\n active: client.active ? '0' : '1',\n }).then((response) => {\n if (response?.client) {\n this.removeNotifications();\n const safeUpdatedClientName = Matomo.helper.htmlEntities(\n response.client.name || response.client.client_id,\n );\n this.showNotification(\n response.client.active\n ? this.translate('OAuth2_AdminResumed', safeUpdatedClientName)\n : this.translate('OAuth2_AdminPaused', safeUpdatedClientName),\n 'success',\n );\n this.$emit('updated', response.client);\n }\n });\n },\n });\n },\n deleteClient(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmDeleteLabel = this.translate('OAuth2_AdminDeleteConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=script&lang=ts\"","import { render } from \"./List.vue?vue&type=template&id=4e1cf580&scoped=true\"\nimport script from \"./List.vue?vue&type=script&lang=ts\"\nexport * from \"./List.vue?vue&type=script&lang=ts\"\n\nimport \"./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-4e1cf580\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"","import { render } from \"./Manage.vue?vue&type=template&id=f7d6db3a\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport { default as Oauth2AdminApp } from './OAuthClients/Manage.vue';\n","import './setPublicPath'\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?22ef","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?7f7b","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a32e","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?0502","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?a589","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?4a8b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c","webpack://OAuth2/./plugins/OAuth2/vue/src/index.ts","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD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C;GACD;EACD,QAAQ,EAAE;IACR,UAAU;MACR,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc;IAC9B;EACD;CACF,CAAC,E;;AC7H6f,C;;ACA5b;AACV;AACL;AACpD,6BAAM,UAAU,MAAM;;AAEP,wE;;ACLf;;;;;AAKG;;;ACLqB;AACF","file":"OAuth2.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","// extracted by mini-css-extract-plugin","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=20798176&scoped=true&lang=css\"","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 },\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 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=20798176&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=20798176&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-20798176\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=script&lang=ts\"","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--15-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Manage.vue?vue&type=script&lang=ts\"","import { render } from \"./Manage.vue?vue&type=template&id=3b7774ee\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport { default as Oauth2AdminApp } from './OAuthClients/Manage.vue';\n","import './setPublicPath'\nexport * from '~entry'\n"],"sourceRoot":""} \ No newline at end of file diff --git a/vue/dist/OAuth2.umd.min.js b/vue/dist/OAuth2.umd.min.js index 102839c..3640e8d 100644 --- a/vue/dist/OAuth2.umd.min.js +++ b/vue/dist/OAuth2.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["OAuth2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["OAuth2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,i){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/OAuth2/vue/dist/",i(i.s="fae3")}({"05ab":function(e,t,i){"use strict";i("5e25")},"19dc":function(t,i){t.exports=e},"5e25":function(e,t,i){},"8bbf":function(e,i){e.exports=t},9601:function(e,t,i){"use strict";i("cd6a")},a5a2:function(e,t){e.exports=i},cd6a:function(e,t,i){},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return pe})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(i.p=l[1])}var o=i("8bbf");const c={class:"oauth2-admin"};function a(e,t,i,n,l,a){const r=Object(o["resolveComponent"])("Oauth2ClientList"),s=Object(o["resolveComponent"])("Oauth2ClientEdit");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:1,"client-id":e.editedClientId,scopes:e.scopes,"initial-secret":e.secret,onCancel:e.showList,onSaved:e.onClientSaved},null,8,["client-id","scopes","initial-secret","onCancel","onSaved"])):(Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:0,clients:e.clients,onCreate:e.createClient,onEdit:e.editClient,onDeleted:e.onClientDeleted,onUpdated:e.onClientUpdated},null,8,["clients","onCreate","onEdit","onDeleted","onUpdated"]))])}var r=i("19dc");const s=e=>(Object(o["pushScopeId"])("data-v-4e1cf580"),e=e(),Object(o["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},m={class:"ui-confirm",ref:"confirmDeleteClient"},u=["value"],h=["value"],p={class:"ui-confirm",ref:"confirmToggleClient"},O=["value"],b=["value"],f={style:{width:"180px"}},j={key:0},A=["title"],y={class:"client-id-code"},_={class:"redirect-uri"},v={class:"created-at"},C=["onClick","title"],g=["onClick","title"],N=["onClick","title"],E={key:1},S={colspan:"8"},V={class:"tableActionBar"},k=s(()=>Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1));function B(e,t,i,n,l,c){const a=Object(o["resolveComponent"])("ContentBlock"),r=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",d,[Object(o["createElementVNode"])("div",m,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmDeleteLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,u),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,h)],512),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmToggleLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,O),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,b)],512),Object(o["createVNode"])(a,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientsDescriptions")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientStatus")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientId")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientRedirects")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientCreatedAt")),1),Object(o["createElementVNode"])("th",f,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientActions")),1)])]),e.clients.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",j,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.clients,t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.client_id},[Object(o["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(o["toDisplayString"])(t.name),9,A),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.typeOptions[t.type]),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])((t.grant_types||[]).join(", ")),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(t.active?e.translate("OAuth2_AdminActive"):e.translate("OAuth2_AdminDisabled")),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("code",y,Object(o["toDisplayString"])(t.client_id),1)]),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.redirect_uris||[],e=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:e},[Object(o["createElementVNode"])("code",_,Object(o["toDisplayString"])(e),1)]))),128))]),Object(o["createElementVNode"])("td",v,Object(o["toDisplayString"])(t.created_at),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("button",{class:Object(o["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(o["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,C),Object(o["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(o["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,g),Object(o["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(o["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,N)])]))),128))])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",E,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",S,Object(o["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[r]]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("a",{class:"createNewClient",onClick:t[0]||(t[0]=Object(o["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[k,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}const D="oauth2clientlist";var w=Object(o["defineComponent"])({name:"Oauth2ClientList",props:{clients:{type:Array,required:!0}},emits:["create","edit","deleted","updated"],components:{ContentBlock:r["ContentBlock"]},directives:{ContentTable:r["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",typeOptions:{confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")}}},methods:{showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:D,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){r["NotificationsStore"].remove(D),r["NotificationsStore"].remove("ajaxHelper")},toggleClientStatus(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.setClientActive",clientId:e.client_id,active:e.active?"0":"1"}).then(e=>{if(null!==e&&void 0!==e&&e.client){this.removeNotifications();const t=r["Matomo"].helper.htmlEntities(e.client.name||e.client.client_id);this.showNotification(e.client.active?this.translate("OAuth2_AdminResumed",t):this.translate("OAuth2_AdminPaused",t),"success"),this.$emit("updated",e.client)}})}})},deleteClient(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:e.client_id}).then(i=>{null!==i&&void 0!==i&&i.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",t),"success"),this.$emit("deleted",e.client_id))})}})}}});i("05ab");w.render=B,w.__scopeId="data-v-4e1cf580";var M=w;const I=e=>(Object(o["pushScopeId"])("data-v-ba4724a2"),e=e(),Object(o["popScopeId"])(),e),T={class:"oauth2-admin oauth2-admin-edit"},x={class:"ui-confirm",ref:"confirmRotateClient"},H=["value"],P=["value"],U={key:0},L={class:"loadingPiwik"},R=I(()=>Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),G={class:"row"},$={class:"row"},q={key:0,class:"row"},F={key:1,class:"row oauth2-secret-head"},z={class:"col s12"},Y={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},X={class:"col s12 m6"},J={class:"copy-secret-wrapper-div"},K={key:0,class:"client-secret-code"},Q={key:1,class:"client-secret-code"},W={class:"col s12 m6"},Z=["innerHTML"],ee={class:"row",name:"type"},te={class:"row",name:"grantType"},ie={class:"row",name:"scopes"},ne={class:"row"},le={class:"row"},oe=["disabled"],ce={class:"entityCancel"};function ae(e,t,i,n,l,c){const a=Object(o["resolveComponent"])("Field"),r=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmRotateLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,H),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,P)],512),Object(o["createVNode"])(r,{"content-title":e.contentTitle},{default:Object(o["withCtx"])(()=>[e.loading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",U,[Object(o["createElementVNode"])("span",L,[R,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:1,onSubmit:t[8]||(t[8]=Object(o["withModifiers"])((...t)=>e.submit&&e.submit(...t),["prevent"]))},[Object(o["createElementVNode"])("div",G,[Object(o["createVNode"])(a,{uicontrol:"text",name:"name",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.form.name=t),"inline-help":e.translate("OAuth2_AdminNameHelp"),title:e.translate("OAuth2_AdminName")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",$,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"description",modelValue:e.form.description,"onUpdate:modelValue":t[1]||(t[1]=t=>e.form.description=t),rows:1,"ui-control-attributes":{style:"min-height: auto;"},"inline-help":e.translate("OAuth2_AdminDescriptionHelp"),title:e.translate("OAuth2_AdminDescription"),placeholder:e.translate("OAuth2_AdminDescriptionPlaceholder")},null,8,["modelValue","inline-help","title","placeholder"])]),e.isEditMode?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createVNode"])(a,{uicontrol:"text",name:"client_id","model-value":e.clientId,title:e.translate("OAuth2_AdminClientId"),disabled:!0},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",F,[Object(o["createElementVNode"])("label",z,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,onClick:t[2]||(t[2]=Object(o["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(o["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Y,[Object(o["createElementVNode"])("div",X,[Object(o["createElementVNode"])("div",J,[e.visibleSecret?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",K,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.displayedSecret),1)])),[[s,{}]]):(Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",Q,Object(o["toDisplayString"])(e.displayedSecret),1))])]),Object(o["createElementVNode"])("div",W,[Object(o["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,Z)])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ee,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:1,uicontrol:"text",name:"type","model-value":e.typeOptions[e.form.type]||e.form.type,title:e.translate("OAuth2_AdminType"),disabled:!0},null,8,["model-value","title"])):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.type=t),title:e.translate("OAuth2_AdminType"),"inline-help":e.translate("OAuth2_AdminTypeHelp","",""),options:e.typeOptions},null,8,["modelValue","title","inline-help","options"]))]),Object(o["createElementVNode"])("div",te,[Object(o["createVNode"])(a,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.grant_types=t),"inline-help":e.translate("OAuth2_AdminGrantTypesHelp"),title:e.translate("OAuth2_AdminClientGrants")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ie,[Object(o["createVNode"])(a,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ne,[Object(o["createVNode"])(a,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.redirect_uris=t),placeholder:"https://example.com/callback","inline-help":e.translate("OAuth2_AdminRedirectUrisHelp"),title:e.translate("OAuth2_AdminRedirectUris")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",le,[Object(o["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(o["toDisplayString"])(e.submitLabel),9,oe)]),Object(o["createElementVNode"])("div",ce,[Object(o["createElementVNode"])("a",{onClick:t[7]||(t[7]=Object(o["withModifiers"])(t=>e.$emit("cancel"),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],32))]),_:1},8,["content-title"])])}var re=i("a5a2");const se="oauth2clientedit";function de(e){const t=Object.keys(e||{})[0]||"";return{name:"",description:"",type:"confidential",grant_types:["authorization_code","client_credentials","refresh_token"],scope:t,redirect_uris:"",active:!0}}var me=Object(o["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:r["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:r["ContentBlock"],Field:re["Field"]},data(){const e={confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},t={authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")};return{loading:!1,confirmRotateLabel:"",typeOptions:e,grantOptions:t,form:de(this.scopes),visibleSecret:this.initialSecret}},created(){this.init()},watch:{clientId(){this.init()},initialSecret(e){this.visibleSecret=e},"form.type":"onFormTypeChange"},computed:{isEditMode(){return"0"!==this.clientId},contentTitle(){return this.isEditMode?this.translate("OAuth2_AdminEditTitle"):this.translate("OAuth2_AdminCreateTitle")},submitLabel(){return this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminSave")},visibleGrantOptions(){if("public"===this.form.type){const e={};return this.grantOptions.authorization_code&&(e.authorization_code=this.grantOptions.authorization_code),this.grantOptions.refresh_token&&(e.refresh_token=this.grantOptions.refresh_token),e}return this.grantOptions},showSecretPanel(){return"confidential"===this.form.type&&(this.isEditMode||!!this.visibleSecret)},canRegenerateSecret(){return this.isEditMode&&"confidential"===this.form.type},displayedSecret(){return this.visibleSecret||"*************"},secretInlineHelp(){return this.visibleSecret?this.translate("OAuth2_ClientSecretVisibleHelp"):this.translate("OAuth2_ClientSecretMaskedHelp")}},methods:{init(){this.removeNotifications(),this.form=de(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.getClient",clientId:this.clientId}).then(e=>{this.form={name:e.name||"",description:e.description||"",type:e.type||"confidential",grant_types:e.grant_types||[],scope:e.scopes&&e.scopes[0]||Object.keys(this.scopes||{})[0]||"",redirect_uris:(e.redirect_uris||[]).join("\n"),active:!!e.active}}).finally(()=>{this.loading=!1}))},onFormTypeChange(e){"public"===e&&this.form.grant_types.includes("client_credentials")&&(this.form.grant_types=this.form.grant_types.filter(e=>"client_credentials"!==e)),"public"===e&&(this.visibleSecret="")},rotateSecret(){this.canRegenerateSecret&&(this.confirmRotateLabel=this.translate("OAuth2_AdminRotateConfirm",this.form.name||this.clientId),r["Matomo"].helper.modalConfirm(this.$refs.confirmRotateClient,{yes:()=>{this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=this.translate("OAuth2_AdminRotatedNotification");this.showNotification(`${t}`,"success","transient")}}).finally(()=>{this.loading=!1})}}))},submit(){if(this.removeNotifications(),!this.checkRequiredFieldsAreSet())return;this.loading=!0;const e={method:this.isEditMode?"OAuth2.updateClient":"OAuth2.createClient",name:this.form.name.trim(),description:this.form.description,type:this.form.type,grantTypes:this.form.grant_types,scope:this.form.scope,redirectUris:this.form.redirect_uris,active:this.form.active?"1":"0"};this.isEditMode&&(e.clientId=this.clientId),r["AjaxHelper"].fetch(e).then(e=>{this.visibleSecret=e.secret||"";const t=r["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=e.secret?this.translate("OAuth2_ClientSecretHelp"):"",l=[i,n].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e.client.client_id})),setTimeout(()=>{this.showNotification(`${l}`,"success","transient")},50)}).finally(()=>{this.loading=!1})},checkRequiredFieldsAreSet(){let e=!0,t="";return this.form.name.trim()?this.form.type.trim()?this.form.grant_types.length?this.form.scope.trim()?!this.form.redirect_uris.trim()&&this.form.grant_types.includes("authorization_code")&&(e=!1,t=this.translate("OAuth2_AdminRedirectUris")):(e=!1,t=this.translate("OAuth2_AdminScope")):(e=!1,t=this.translate("OAuth2_AdminClientGrants")):(e=!1,t=this.translate("OAuth2_AdminType")):(e=!1,t=this.translate("OAuth2_AdminName")),!e&&t&&this.showErrorFieldNotProvidedNotification(t),e},removeNotifications(){r["NotificationsStore"].remove(se),r["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:se,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("9601");me.render=ae,me.__scopeId="data-v-ba4724a2";var ue=me,he=Object(o["defineComponent"])({name:"Oauth2AdminApp",props:{initialClients:{type:Array,required:!0},scopes:{type:Object,required:!0}},components:{Oauth2ClientList:M,Oauth2ClientEdit:ue},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(o["watch"])(()=>r["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(r["MatomoUrl"].hashParsed.value.idClient)},methods:{initState(e){e?this.secretClientId&&this.secretClientId!==e&&(this.secret="",this.secretClientId=""):(this.secret="",this.secretClientId=""),this.editedClientId=e||""},createClient(){r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},r["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",r["MatomoUrl"].updateHash(e)},onClientSaved(e){const t=this.clients.findIndex(t=>t.client_id===e.client.client_id);-1===t?this.clients.push(e.client):this.clients.splice(t,1,e.client),this.clients=[...this.clients].sort((e,t)=>{const i=e.updated_at?new Date(e.updated_at).getTime():0,n=t.updated_at?new Date(t.updated_at).getTime():0;return n!==i?n-i:e.name.localeCompare(t.name)}),this.secret=e.secret||"",this.secretClientId=e.secret?e.client.client_id:""},onClientDeleted(e){this.secret="",this.secretClientId===e&&(this.secretClientId=""),this.clients=this.clients.filter(t=>t.client_id!==e)},onClientUpdated(e){const t=this.clients.findIndex(t=>t.client_id===e.client_id);-1!==t&&(this.clients.splice(t,1,e),this.clients=[...this.clients])}},computed:{isEditMode(){return!!this.editedClientId}}});he.render=a;var pe=he; +(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},"556e":function(e,t,i){},7066:function(e,t,i){"use strict";i("556e")},"8bbf":function(e,i){e.exports=t},9601:function(e,t,i){"use strict";i("cd6a")},a5a2:function(e,t){e.exports=i},cd6a:function(e,t,i){},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"Oauth2AdminApp",(function(){return pe})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(i.p=l[1])}var o=i("8bbf");const a={class:"oauth2-admin"};function c(e,t,i,n,l,c){const r=Object(o["resolveComponent"])("Oauth2ClientList"),s=Object(o["resolveComponent"])("Oauth2ClientEdit");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",a,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:1,"client-id":e.editedClientId,scopes:e.scopes,"initial-secret":e.secret,onCancel:e.showList,onSaved:e.onClientSaved},null,8,["client-id","scopes","initial-secret","onCancel","onSaved"])):(Object(o["openBlock"])(),Object(o["createBlock"])(r,{key:0,clients:e.clients,scopes:e.scopes,onCreate:e.createClient,onEdit:e.editClient,onDeleted:e.onClientDeleted,onUpdated:e.onClientUpdated},null,8,["clients","scopes","onCreate","onEdit","onDeleted","onUpdated"]))])}var r=i("19dc");const s=e=>(Object(o["pushScopeId"])("data-v-20798176"),e=e(),Object(o["popScopeId"])(),e),d={class:"oauth2-admin oauth2-admin-list"},m={class:"ui-confirm",ref:"confirmDeleteClient"},u=["value"],h=["value"],p={class:"ui-confirm",ref:"confirmToggleClient"},O=["value"],b=["value"],j={style:{width:"180px"}},f={key:0},A=["title"],y={class:"client-id-code"},_={class:"redirect-uri"},v={class:"created-at"},C=["onClick","title"],g=["onClick","title"],N=["onClick","title"],S={key:1},E={colspan:"9"},V={class:"tableActionBar"},k=s(()=>Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1));function B(e,t,i,n,l,a){const c=Object(o["resolveComponent"])("ContentBlock"),r=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",d,[Object(o["createElementVNode"])("div",m,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmDeleteLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,u),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,h)],512),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.confirmToggleLabel),1),Object(o["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,O),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,b)],512),Object(o["createVNode"])(c,{"content-title":e.translate("OAuth2_AdminHeading"),feature:e.translate("OAuth2_AdminHeading")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientsDescriptions")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminName")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientType")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_AdminClientGrants")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("OAuth2_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",f,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.clients,t=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.client_id},[Object(o["createElementVNode"])("td",{title:e.$sanitize(t.description)},Object(o["toDisplayString"])(t.name),9,A),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.typeOptions[t.type]),1),Object(o["createElementVNode"])("td",null,[(Object(o["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",y,Object(o["toDisplayString"])(t.client_id),1)]),Object(o["createElementVNode"])("td",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.redirect_uris||[],e=>(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:e},[Object(o["createElementVNode"])("code",_,Object(o["toDisplayString"])(e),1)]))),128))]),Object(o["createElementVNode"])("td",v,Object(o["toDisplayString"])(t.created_at),1),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("button",{class:Object(o["normalizeClass"])("table-action "+(t.active?"icon-pause":"icon-play")),onClick:Object(o["withModifiers"])(i=>e.toggleClientStatus(t),["prevent"]),title:t.active?e.translate("OAuth2_AdminPause"):e.translate("OAuth2_AdminResume")},null,10,C),Object(o["createElementVNode"])("button",{class:"table-action icon-edit",onClick:Object(o["withModifiers"])(i=>e.$emit("edit",t.client_id),["prevent"]),title:e.translate("OAuth2_AdminEdit")},null,8,g),Object(o["createElementVNode"])("button",{class:"table-action icon-delete",onClick:Object(o["withModifiers"])(i=>e.deleteClient(t),["prevent"]),title:e.translate("OAuth2_AdminDelete")},null,8,N)])]))),128))])):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tbody",S,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",E,Object(o["toDisplayString"])(e.translate("OAuth2_AdminNoClients")),1)])]))])),[[r]]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("a",{class:"createNewClient",onClick:t[0]||(t[0]=Object(o["withModifiers"])(t=>e.$emit("create"),["prevent"]))},[k,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("OAuth2_AdminCreateTitle")),1)])])]),_:1},8,["content-title","feature"])])}const D="oauth2clientlist";var w=Object(o["defineComponent"])({name:"Oauth2ClientList",props:{clients:{type:Array,required:!0},scopes:{type:Object,required:!0}},emits:["create","edit","deleted","updated"],components:{ContentBlock:r["ContentBlock"]},directives:{ContentTable:r["ContentTable"]},data(){return{confirmDeleteLabel:"",confirmToggleLabel:"",typeOptions:{confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},grantTypeOptions:{authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")}}},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=r["NotificationsStore"].show({message:e,context:t,id:D,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},removeNotifications(){r["NotificationsStore"].remove(D),r["NotificationsStore"].remove("ajaxHelper")},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=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmToggleLabel=e.active?this.translate("OAuth2_AdminPauseConfirm",t):this.translate("OAuth2_AdminResumeConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmToggleClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.setClientActive",clientId:e.client_id,active:e.active?"0":"1"}).then(e=>{if(null!==e&&void 0!==e&&e.client){this.removeNotifications();const t=r["Matomo"].helper.htmlEntities(e.client.name||e.client.client_id);this.showNotification(e.client.active?this.translate("OAuth2_AdminResumed",t):this.translate("OAuth2_AdminPaused",t),"success"),this.$emit("updated",e.client)}})}})},deleteClient(e){const t=r["Matomo"].helper.htmlEntities(e.name||e.client_id);this.confirmDeleteLabel=this.translate("OAuth2_AdminDeleteConfirm",t),r["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteClient,{yes:()=>{r["AjaxHelper"].fetch({method:"OAuth2.deleteClient",clientId:e.client_id}).then(i=>{null!==i&&void 0!==i&&i.deleted&&(this.removeNotifications(),this.showNotification(this.translate("OAuth2_AdminDeleted",t),"success"),this.$emit("deleted",e.client_id))})}})}}});i("7066");w.render=B,w.__scopeId="data-v-20798176";var M=w;const T=e=>(Object(o["pushScopeId"])("data-v-ba4724a2"),e=e(),Object(o["popScopeId"])(),e),I={class:"oauth2-admin oauth2-admin-edit"},x={class:"ui-confirm",ref:"confirmRotateClient"},P=["value"],H=["value"],U={key:0},L={class:"loadingPiwik"},G=T(()=>Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1)),R={class:"row"},q={class:"row"},$={key:0,class:"row"},z={key:1,class:"row oauth2-secret-head"},F={class:"col s12"},Y={key:2,class:"oauth2-secret-div form-group row matomo-form-field"},W={class:"col s12 m6"},X={class:"copy-secret-wrapper-div"},J={key:0,class:"client-secret-code"},K={key:1,class:"client-secret-code"},Q={class:"col s12 m6"},Z=["innerHTML"],ee={class:"row",name:"type"},te={class:"row",name:"grantType"},ie={class:"row",name:"scopes"},ne={class:"row"},le={class:"row"},oe=["disabled"],ae={class:"entityCancel"};function ce(e,t,i,n,l,a){const c=Object(o["resolveComponent"])("Field"),r=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",I,[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,P),Object(o["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,H)],512),Object(o["createVNode"])(r,{"content-title":e.contentTitle},{default:Object(o["withCtx"])(()=>[e.loading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",U,[Object(o["createElementVNode"])("span",L,[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"])(c,{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",q,[Object(o["createVNode"])(c,{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",$,[Object(o["createVNode"])(c,{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",z,[Object(o["createElementVNode"])("label",F,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("OAuth2_ClientSecret"))+" ",1),e.canRegenerateSecret?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,onClick:t[2]||(t[2]=Object(o["withModifiers"])((...t)=>e.rotateSecret&&e.rotateSecret(...t),["prevent"]))}," ("+Object(o["toDisplayString"])(e.translate("OAuth2_AdminRotateSecret"))+") ",1)):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),e.showSecretPanel?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Y,[Object(o["createElementVNode"])("div",W,[Object(o["createElementVNode"])("div",X,[e.visibleSecret?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",J,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.displayedSecret),1)])),[[s,{}]]):(Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",K,Object(o["toDisplayString"])(e.displayedSecret),1))])]),Object(o["createElementVNode"])("div",Q,[Object(o["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.secretInlineHelp)},null,8,Z)])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ee,[e.isEditMode?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{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"])(c,{key:0,uicontrol:"select",name:"type",modelValue:e.form.type,"onUpdate:modelValue":t[3]||(t[3]=t=>e.form.type=t),title:e.translate("OAuth2_AdminType"),"inline-help":e.translate("OAuth2_AdminTypeHelp","",""),options:e.typeOptions},null,8,["modelValue","title","inline-help","options"]))]),Object(o["createElementVNode"])("div",te,[Object(o["createVNode"])(c,{uicontrol:"checkbox",options:e.visibleGrantOptions,"var-type":"array",name:"grant_types",modelValue:e.form.grant_types,"onUpdate:modelValue":t[4]||(t[4]=t=>e.form.grant_types=t),"inline-help":e.translate("OAuth2_AdminGrantTypesHelp"),title:e.translate("OAuth2_AdminClientGrants")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ie,[Object(o["createVNode"])(c,{uicontrol:"select",options:e.scopes,name:"scopes",modelValue:e.form.scope,"onUpdate:modelValue":t[5]||(t[5]=t=>e.form.scope=t),"inline-help":e.translate("OAuth2_AdminScopeHelp","",""),title:e.translate("OAuth2_AdminScope")},null,8,["options","modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",ne,[Object(o["createVNode"])(c,{uicontrol:"textarea",name:"redirect_uris",modelValue:e.form.redirect_uris,"onUpdate:modelValue":t[6]||(t[6]=t=>e.form.redirect_uris=t),placeholder:"https://example.com/callback","inline-help":e.translate("OAuth2_AdminRedirectUrisHelp"),title:e.translate("OAuth2_AdminRedirectUris")},null,8,["modelValue","inline-help","title"])]),Object(o["createElementVNode"])("div",le,[Object(o["createElementVNode"])("button",{type:"submit",class:"btn",disabled:e.loading},Object(o["toDisplayString"])(e.submitLabel),9,oe)]),Object(o["createElementVNode"])("div",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 re=i("a5a2");const se="oauth2clientedit";function de(e){const t=Object.keys(e||{})[0]||"";return{name:"",description:"",type:"confidential",grant_types:["authorization_code","client_credentials","refresh_token"],scope:t,redirect_uris:"",active:!0}}var me=Object(o["defineComponent"])({name:"Oauth2ClientEdit",props:{clientId:{type:String,required:!0},initialSecret:{type:String,default:""},scopes:{type:Object,required:!0}},directives:{CopyToClipboard:r["CopyToClipboard"]},emits:["cancel","saved"],components:{ContentBlock:r["ContentBlock"],Field:re["Field"]},data(){const e={confidential:this.translate("OAuth2_AdminConfidential"),public:this.translate("OAuth2_AdminPublic")},t={authorization_code:this.translate("OAuth2_AdminGrantAuthorizationCode"),client_credentials:this.translate("OAuth2_AdminGrantClientCredentials"),refresh_token:this.translate("OAuth2_AdminGrantRefreshToken")};return{loading:!1,confirmRotateLabel:"",typeOptions:e,grantOptions:t,form:de(this.scopes),visibleSecret:this.initialSecret}},created(){this.init()},watch:{clientId(){this.init()},initialSecret(e){this.visibleSecret=e},"form.type":"onFormTypeChange"},computed:{isEditMode(){return"0"!==this.clientId},contentTitle(){return this.isEditMode?this.translate("OAuth2_AdminEditTitle"):this.translate("OAuth2_AdminCreateTitle")},submitLabel(){return this.isEditMode?this.translate("OAuth2_AdminUpdate"):this.translate("OAuth2_AdminSave")},visibleGrantOptions(){if("public"===this.form.type){const e={};return this.grantOptions.authorization_code&&(e.authorization_code=this.grantOptions.authorization_code),this.grantOptions.refresh_token&&(e.refresh_token=this.grantOptions.refresh_token),e}return this.grantOptions},showSecretPanel(){return"confidential"===this.form.type&&(this.isEditMode||!!this.visibleSecret)},canRegenerateSecret(){return this.isEditMode&&"confidential"===this.form.type},displayedSecret(){return this.visibleSecret||"*************"},secretInlineHelp(){return this.visibleSecret?this.translate("OAuth2_ClientSecretVisibleHelp"):this.translate("OAuth2_ClientSecretMaskedHelp")}},methods:{init(){this.removeNotifications(),this.form=de(this.scopes),this.visibleSecret=this.initialSecret,this.isEditMode&&(this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.getClient",clientId:this.clientId}).then(e=>{this.form={name:e.name||"",description:e.description||"",type:e.type||"confidential",grant_types:e.grant_types||[],scope:e.scopes&&e.scopes[0]||Object.keys(this.scopes||{})[0]||"",redirect_uris:(e.redirect_uris||[]).join("\n"),active:!!e.active}}).finally(()=>{this.loading=!1}))},onFormTypeChange(e){"public"===e&&this.form.grant_types.includes("client_credentials")&&(this.form.grant_types=this.form.grant_types.filter(e=>"client_credentials"!==e)),"public"===e&&(this.visibleSecret="")},rotateSecret(){this.canRegenerateSecret&&(this.confirmRotateLabel=this.translate("OAuth2_AdminRotateConfirm",this.form.name||this.clientId),r["Matomo"].helper.modalConfirm(this.$refs.confirmRotateClient,{yes:()=>{this.loading=!0,r["AjaxHelper"].fetch({method:"OAuth2.rotateSecret",clientId:this.clientId}).then(e=>{if(null!==e&&void 0!==e&&e.secret){this.visibleSecret=e.secret;const t=this.translate("OAuth2_AdminRotatedNotification");this.showNotification(`${t}`,"success","transient")}}).finally(()=>{this.loading=!1})}}))},submit(){if(this.removeNotifications(),!this.checkRequiredFieldsAreSet())return;this.loading=!0;const e={method:this.isEditMode?"OAuth2.updateClient":"OAuth2.createClient",name:this.form.name.trim(),description:this.form.description,type:this.form.type,grantTypes:this.form.grant_types,scope:this.form.scope,redirectUris:this.form.redirect_uris,active:this.form.active?"1":"0"};this.isEditMode&&(e.clientId=this.clientId),r["AjaxHelper"].fetch(e).then(e=>{this.visibleSecret=e.secret||"";const t=r["Matomo"].helper.htmlEntities(e.client.name||""),i=this.isEditMode?this.translate("OAuth2_AdminUpdated",t):this.translate("OAuth2_AdminCreated",t),n=e.secret?this.translate("OAuth2_ClientSecretHelp"):"",l=[i,n].filter(Boolean).join(" ");this.$emit("saved",{client:e.client,secret:e.secret||null}),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e.client.client_id})),setTimeout(()=>{this.showNotification(`${l}`,"success","transient")},50)}).finally(()=>{this.loading=!1})},checkRequiredFieldsAreSet(){let e=!0,t="";return this.form.name.trim()?this.form.type.trim()?this.form.grant_types.length?this.form.scope.trim()?!this.form.redirect_uris.trim()&&this.form.grant_types.includes("authorization_code")&&(e=!1,t=this.translate("OAuth2_AdminRedirectUris")):(e=!1,t=this.translate("OAuth2_AdminScope")):(e=!1,t=this.translate("OAuth2_AdminClientGrants")):(e=!1,t=this.translate("OAuth2_AdminType")):(e=!1,t=this.translate("OAuth2_AdminName")),!e&&t&&this.showErrorFieldNotProvidedNotification(t),e},removeNotifications(){r["NotificationsStore"].remove(se),r["NotificationsStore"].remove("ajaxHelper")},showNotification(e,t,i=null){const n=r["NotificationsStore"].show({message:e,context:t,id:se,type:null!==i?i:"toast"});setTimeout(()=>{r["NotificationsStore"].scrollToNotification(n)},200)},showErrorFieldNotProvidedNotification(e){const t=this.translate("OAuth2_ErrorXNotProvided",[e]);this.showNotification(t,"error")}}});i("9601");me.render=ce,me.__scopeId="data-v-ba4724a2";var ue=me,he=Object(o["defineComponent"])({name:"Oauth2AdminApp",props:{initialClients:{type:Array,required:!0},scopes:{type:Object,required:!0}},components:{Oauth2ClientList:M,Oauth2ClientEdit:ue},data(){return{clients:this.initialClients||[],secret:"",secretClientId:"",editedClientId:""}},created(){Object(o["watch"])(()=>r["MatomoUrl"].hashParsed.value.idClient,e=>{this.initState(e)}),this.initState(r["MatomoUrl"].hashParsed.value.idClient)},methods:{initState(e){e?this.secretClientId&&this.secretClientId!==e&&(this.secret="",this.secretClientId=""):(this.secret="",this.secretClientId=""),this.editedClientId=e||""},createClient(){r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:"0"})),this.secret="",this.secretClientId=""},editClient(e){this.secretClientId!==e&&(this.secret="",this.secretClientId=""),r["MatomoUrl"].updateHash(Object.assign(Object.assign({},r["MatomoUrl"].hashParsed.value),{},{idClient:e}))},showList(){const e=Object.assign({},r["MatomoUrl"].hashParsed.value);delete e.idClient,this.secret="",this.secretClientId="",r["MatomoUrl"].updateHash(e)},onClientSaved(e){const t=this.clients.findIndex(t=>t.client_id===e.client.client_id);-1===t?this.clients.push(e.client):this.clients.splice(t,1,e.client),this.clients=[...this.clients].sort((e,t)=>{const i=e.updated_at?new Date(e.updated_at).getTime():0,n=t.updated_at?new Date(t.updated_at).getTime():0;return n!==i?n-i:e.name.localeCompare(t.name)}),this.secret=e.secret||"",this.secretClientId=e.secret?e.client.client_id:""},onClientDeleted(e){this.secret="",this.secretClientId===e&&(this.secretClientId=""),this.clients=this.clients.filter(t=>t.client_id!==e)},onClientUpdated(e){const t=this.clients.findIndex(t=>t.client_id===e.client_id);-1!==t&&(this.clients.splice(t,1,e),this.clients=[...this.clients])}},computed:{isEditMode(){return!!this.editedClientId}}});he.render=c;var pe=he; /*! * Matomo - free/libre analytics platform * diff --git a/vue/dist/OAuth2.umd.min.js.map b/vue/dist/OAuth2.umd.min.js.map index aee7209..beebb2a 100644 --- a/vue/dist/OAuth2.umd.min.js.map +++ b/vue/dist/OAuth2.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?542c","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__19dc__","__WEBPACK_EXTERNAL_MODULE__8bbf__","__WEBPACK_EXTERNAL_MODULE_a5a2__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","class","isEditMode","client-id","editedClientId","scopes","initial-secret","secret","showList","onClientSaved","clients","createClient","editClient","onClientDeleted","onClientUpdated","ref","style","colspan","confirmDeleteLabel","role","type","translate","confirmToggleLabel","content-title","feature","length","client","client_id","title","$sanitize","description","typeOptions","grant_types","join","active","redirect_uris","uri","created_at","toggleClientStatus","$emit","deleteClient","notificationId","props","Array","required","emits","components","ContentBlock","directives","ContentTable","confidential","public","methods","message","context","instanceId","show","id","setTimeout","scrollToNotification","remove","safeClientName","helper","htmlEntities","modalConfirm","$refs","confirmToggleClient","yes","fetch","method","clientId","then","response","removeNotifications","safeUpdatedClientName","showNotification","confirmDeleteClient","deleted","render","__scopeId","confirmRotateLabel","contentTitle","loading","submit","uicontrol","form","inline-help","rows","ui-control-attributes","placeholder","model-value","disabled","showSecretPanel","canRegenerateSecret","rotateSecret","visibleSecret","displayedSecret","secretInlineHelp","options","visibleGrantOptions","var-type","scope","submitLabel","getDefaultForm","firstScope","keys","String","initialSecret","default","CopyToClipboard","Field","grantOptions","authorization_code","client_credentials","refresh_token","init","watch","newSecret","computed","filtered","finally","newType","includes","filter","confirmRotateClient","checkRequiredFieldsAreSet","params","trim","grantTypes","redirectUris","clientMessage","secretMessage","Boolean","updateHash","hashParsed","idClient","errorMessage","showErrorFieldNotProvidedNotification","notificationInstanceId","initialClients","Oauth2ClientList","Oauth2ClientEdit","secretClientId","initState","payload","index","findIndex","push","splice","sort","left","right","leftTime","updated_at","Date","getTime","rightTime","localeCompare","updatedClient"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AE1BrE,KAAKqD,QAAQ0I,OAAOH,EAAO,EAAGD,EAAQtH,QAGxCrE,KAAKqD,QAAU,IAAIrD,KAAKqD,SAAS2I,KAAK,CAACC,EAAMC,KAC3C,MAAMC,EAAWF,EAAKG,WAAa,IAAIC,KAAKJ,EAAKG,YAAYE,UAAY,EACnEC,EAAYL,EAAME,WAAa,IAAIC,KAAKH,EAAME,YAAYE,UAAY,EAE5E,OAAIC,IAAcJ,EACTI,EAAYJ,EAGdF,EAAKnL,KAAK0L,cAAcN,EAAMpL,QAEvCd,KAAKkD,OAASyI,EAAQzI,QAAU,GAChClD,KAAKyL,eAAiBE,EAAQzI,OAASyI,EAAQtH,OAAOC,UAAY,IAEpE,gBAAgB2C,GACdjH,KAAKkD,OAAS,GACVlD,KAAKyL,iBAAmBxE,IAC1BjH,KAAKyL,eAAiB,IAExBzL,KAAKqD,QAAUrD,KAAKqD,QAAQiH,OAAQjG,GAAWA,EAAOC,YAAc2C,IAEtE,gBAAgBwF,GACd,MAAMb,EAAQ5L,KAAKqD,QAAQwI,UACxBxH,GAAWA,EAAOC,YAAcmI,EAAcnI,YAElC,IAAXsH,IAIJ5L,KAAKqD,QAAQ0I,OAAOH,EAAO,EAAGa,GAC9BzM,KAAKqD,QAAU,IAAIrD,KAAKqD,YAG5B4G,SAAU,CACR,aACE,QAASjK,KAAK+C,mBCvHpB,GAAO0E,OAASA,EAED","file":"OAuth2.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"","module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","\n\n\n","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n ContentTable,\n Matomo,\n NotificationType,\n NotificationsStore,\n} from 'CoreHome';\nimport { Client } from '../types';\n\nconst notificationId = 'oauth2clientlist';\n\nexport default defineComponent({\n name: 'Oauth2ClientList',\n props: {\n clients: {\n type: Array as PropType,\n required: true,\n },\n },\n emits: ['create', 'edit', 'deleted', 'updated'],\n components: {\n ContentBlock,\n },\n directives: {\n ContentTable,\n },\n data() {\n return {\n confirmDeleteLabel: '',\n confirmToggleLabel: '',\n typeOptions: {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n } as Record,\n };\n },\n methods: {\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const instanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n\n setTimeout(() => {\n NotificationsStore.scrollToNotification(instanceId);\n }, 200);\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n toggleClientStatus(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmToggleLabel = client.active\n ? this.translate('OAuth2_AdminPauseConfirm', safeClientName)\n : this.translate('OAuth2_AdminResumeConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmToggleClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.setClientActive',\n clientId: client.client_id,\n active: client.active ? '0' : '1',\n }).then((response) => {\n if (response?.client) {\n this.removeNotifications();\n const safeUpdatedClientName = Matomo.helper.htmlEntities(\n response.client.name || response.client.client_id,\n );\n this.showNotification(\n response.client.active\n ? this.translate('OAuth2_AdminResumed', safeUpdatedClientName)\n : this.translate('OAuth2_AdminPaused', safeUpdatedClientName),\n 'success',\n );\n this.$emit('updated', response.client);\n }\n });\n },\n });\n },\n deleteClient(client: Client) {\n const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id);\n this.confirmDeleteLabel = this.translate('OAuth2_AdminDeleteConfirm', safeClientName);\n\n Matomo.helper.modalConfirm(this.$refs.confirmDeleteClient as HTMLElement, {\n yes: () => {\n AjaxHelper.fetch({\n method: 'OAuth2.deleteClient',\n clientId: client.client_id,\n }).then((response) => {\n if (response?.deleted) {\n this.removeNotifications();\n this.showNotification(this.translate('OAuth2_AdminDeleted', safeClientName), 'success');\n this.$emit('deleted', client.client_id);\n }\n });\n },\n });\n },\n },\n});\n","import { render } from \"./List.vue?vue&type=template&id=4e1cf580&scoped=true\"\nimport script from \"./List.vue?vue&type=script&lang=ts\"\nexport * from \"./List.vue?vue&type=script&lang=ts\"\n\nimport \"./List.vue?vue&type=style&index=0&id=4e1cf580&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-4e1cf580\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","import { render } from \"./Manage.vue?vue&type=template&id=f7d6db3a\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://OAuth2/webpack/universalModuleDefinition","webpack://OAuth2/webpack/bootstrap","webpack://OAuth2/external \"CoreHome\"","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?7f7b","webpack://OAuth2/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?f40d","webpack://OAuth2/external \"CorePluginsAdmin\"","webpack://OAuth2/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?1486","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/List.vue?93f1","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?ce49","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Edit.vue?3733","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?175b","webpack://OAuth2/./plugins/OAuth2/vue/src/OAuthClients/Manage.vue?084c"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__19dc__","__WEBPACK_EXTERNAL_MODULE__8bbf__","__WEBPACK_EXTERNAL_MODULE_a5a2__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","class","isEditMode","client-id","editedClientId","scopes","initial-secret","secret","showList","onClientSaved","clients","createClient","editClient","onClientDeleted","onClientUpdated","ref","style","colspan","confirmDeleteLabel","role","type","translate","confirmToggleLabel","content-title","feature","length","client","client_id","title","$sanitize","description","typeOptions","grant_types","grantType","getGrantTypeLabel","getScopeLabel","active","redirect_uris","uri","created_at","toggleClientStatus","$emit","deleteClient","notificationId","props","Array","required","emits","components","ContentBlock","directives","ContentTable","confidential","public","grantTypeOptions","authorization_code","client_credentials","refresh_token","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","String","initialSecret","default","CopyToClipboard","Field","grantOptions","init","watch","newSecret","computed","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,E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eof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"CoreHome\", , \"CorePluginsAdmin\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OAuth2\"] = factory(require(\"CoreHome\"), require(\"vue\"), require(\"CorePluginsAdmin\"));\n\telse\n\t\troot[\"OAuth2\"] = factory(root[\"CoreHome\"], root[\"Vue\"], root[\"CorePluginsAdmin\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/OAuth2/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__;","export * from \"-!../../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./List.vue?vue&type=style&index=0&id=20798176&scoped=true&lang=css\"","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 },\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 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=20798176&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=20798176&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-20798176\"\n\nexport default script","\n\n\n\n\n","\nimport { defineComponent, PropType } from 'vue';\nimport {\n AjaxHelper,\n ContentBlock,\n MatomoUrl,\n Matomo,\n NotificationType,\n NotificationsStore,\n CopyToClipboard,\n} from 'CoreHome';\nimport { Field } from 'CorePluginsAdmin';\nimport { Client, ClientForm } from '../types';\n\nconst notificationId = 'oauth2clientedit';\n\nfunction getDefaultForm(scopes: Record): ClientForm {\n const firstScope = Object.keys(scopes || {})[0] || '';\n\n return {\n name: '',\n description: '',\n type: 'confidential',\n grant_types: ['authorization_code', 'client_credentials', 'refresh_token'],\n scope: firstScope,\n redirect_uris: '',\n active: true,\n };\n}\n\nexport default defineComponent({\n name: 'Oauth2ClientEdit',\n props: {\n clientId: {\n type: String,\n required: true,\n },\n initialSecret: {\n type: String,\n default: '',\n },\n scopes: {\n type: Object as PropType>,\n required: true,\n },\n },\n directives: {\n CopyToClipboard,\n },\n emits: ['cancel', 'saved'],\n components: {\n ContentBlock,\n Field,\n },\n data() {\n const typeOptions = {\n confidential: this.translate('OAuth2_AdminConfidential'),\n public: this.translate('OAuth2_AdminPublic'),\n };\n\n const grantOptions = {\n authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'),\n client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'),\n refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'),\n };\n\n return {\n loading: false,\n confirmRotateLabel: '',\n typeOptions,\n grantOptions,\n form: getDefaultForm(this.scopes),\n visibleSecret: this.initialSecret,\n };\n },\n created() {\n this.init();\n },\n watch: {\n clientId() {\n this.init();\n },\n initialSecret(newSecret: string) {\n this.visibleSecret = newSecret;\n },\n 'form.type': 'onFormTypeChange',\n },\n computed: {\n isEditMode(): boolean {\n return this.clientId !== '0';\n },\n contentTitle(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminEditTitle')\n : this.translate('OAuth2_AdminCreateTitle');\n },\n submitLabel(): string {\n return this.isEditMode\n ? this.translate('OAuth2_AdminUpdate')\n : this.translate('OAuth2_AdminSave');\n },\n visibleGrantOptions(): Record {\n if (this.form.type === 'public') {\n const filtered: Record = {};\n if (this.grantOptions.authorization_code) {\n filtered.authorization_code = this.grantOptions.authorization_code;\n }\n if (this.grantOptions.refresh_token) {\n filtered.refresh_token = this.grantOptions.refresh_token;\n }\n return filtered;\n }\n\n return this.grantOptions;\n },\n showSecretPanel(): boolean {\n return this.form.type === 'confidential' && (this.isEditMode || !!this.visibleSecret);\n },\n canRegenerateSecret(): boolean {\n return this.isEditMode && this.form.type === 'confidential';\n },\n displayedSecret(): string {\n return this.visibleSecret || '*************';\n },\n secretInlineHelp(): string {\n if (this.visibleSecret) {\n return this.translate('OAuth2_ClientSecretVisibleHelp');\n }\n\n return this.translate('OAuth2_ClientSecretMaskedHelp');\n },\n },\n methods: {\n init() {\n this.removeNotifications();\n this.form = getDefaultForm(this.scopes);\n this.visibleSecret = this.initialSecret;\n\n if (!this.isEditMode) {\n return;\n }\n\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.getClient',\n clientId: this.clientId,\n }).then((client) => {\n this.form = {\n name: client.name || '',\n description: client.description || '',\n type: client.type || 'confidential',\n grant_types: client.grant_types || [],\n scope: (client.scopes && client.scopes[0]) || Object.keys(this.scopes || {})[0] || '',\n redirect_uris: (client.redirect_uris || []).join('\\n'),\n active: !!client.active,\n };\n }).finally(() => {\n this.loading = false;\n });\n },\n onFormTypeChange(newType: string) {\n if (newType === 'public' && this.form.grant_types.includes('client_credentials')) {\n this.form.grant_types = this.form.grant_types.filter((value: string) => value !== 'client_credentials');\n }\n\n if (newType === 'public') {\n this.visibleSecret = '';\n }\n },\n rotateSecret() {\n if (!this.canRegenerateSecret) {\n return;\n }\n\n this.confirmRotateLabel = this.translate('OAuth2_AdminRotateConfirm', this.form.name || this.clientId);\n Matomo.helper.modalConfirm(this.$refs.confirmRotateClient as HTMLElement, {\n yes: () => {\n this.loading = true;\n AjaxHelper.fetch({\n method: 'OAuth2.rotateSecret',\n clientId: this.clientId,\n }).then((response) => {\n if (response?.secret) {\n this.visibleSecret = response.secret;\n const message = this.translate('OAuth2_AdminRotatedNotification');\n this.showNotification(`${message}`, 'success', 'transient');\n }\n }).finally(() => {\n this.loading = false;\n });\n },\n });\n },\n submit() {\n this.removeNotifications();\n if (!this.checkRequiredFieldsAreSet()) {\n return;\n }\n\n this.loading = true;\n const params = {\n method: this.isEditMode ? 'OAuth2.updateClient' : 'OAuth2.createClient',\n name: this.form.name.trim(),\n description: this.form.description,\n type: this.form.type,\n grantTypes: this.form.grant_types,\n scope: this.form.scope,\n redirectUris: this.form.redirect_uris,\n active: this.form.active ? '1' : '0',\n } as Record;\n\n if (this.isEditMode) {\n params.clientId = this.clientId;\n }\n\n AjaxHelper.fetch(params).then((response) => {\n this.visibleSecret = response.secret || '';\n const safeClientName = Matomo.helper.htmlEntities(response.client.name || '');\n const clientMessage = this.isEditMode\n ? this.translate('OAuth2_AdminUpdated', safeClientName)\n : this.translate('OAuth2_AdminCreated', safeClientName);\n const secretMessage = response.secret\n ? this.translate('OAuth2_ClientSecretHelp')\n : '';\n const message = [clientMessage, secretMessage].filter(Boolean).join(' ');\n\n this.$emit('saved', {\n client: response.client,\n secret: response.secret || null,\n });\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: response.client.client_id,\n });\n\n setTimeout(() => {\n this.showNotification(`${message}`, 'success', 'transient');\n }, 50);\n }).finally(() => {\n this.loading = false;\n });\n },\n checkRequiredFieldsAreSet() {\n let response = true;\n let errorMessage = '';\n if (!this.form.name.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminName');\n } else if (!this.form.type.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminType');\n } else if (!this.form.grant_types.length) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminClientGrants');\n } else if (!this.form.scope.trim()) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminScope');\n } else if (!this.form.redirect_uris.trim() && this.form.grant_types.includes('authorization_code')) {\n response = false;\n errorMessage = this.translate('OAuth2_AdminRedirectUris');\n }\n\n if (!response && errorMessage) {\n this.showErrorFieldNotProvidedNotification(errorMessage);\n }\n\n return response;\n },\n removeNotifications() {\n NotificationsStore.remove(notificationId);\n NotificationsStore.remove('ajaxHelper');\n },\n showNotification(message: string, context: NotificationType['context'],\n type: null|NotificationType['type'] = null) {\n const notificationInstanceId = NotificationsStore.show({\n message,\n context,\n id: notificationId,\n type: type !== null ? type : 'toast',\n });\n setTimeout(() => {\n NotificationsStore.scrollToNotification(notificationInstanceId);\n }, 200);\n },\n showErrorFieldNotProvidedNotification(title: string) {\n const message = this.translate('OAuth2_ErrorXNotProvided', [title]);\n this.showNotification(message, 'error');\n },\n },\n});\n","import { render } from \"./Edit.vue?vue&type=template&id=ba4724a2&scoped=true\"\nimport script from \"./Edit.vue?vue&type=script&lang=ts\"\nexport * from \"./Edit.vue?vue&type=script&lang=ts\"\n\nimport \"./Edit.vue?vue&type=style&index=0&id=ba4724a2&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-ba4724a2\"\n\nexport default script","\nimport { defineComponent, watch } from 'vue';\nimport { MatomoUrl } from 'CoreHome';\nimport Oauth2ClientList from './List.vue';\nimport Oauth2ClientEdit from './Edit.vue';\nimport { Client } from '../types';\n\nexport default defineComponent({\n name: 'Oauth2AdminApp',\n props: {\n initialClients: {\n type: Array as () => Client[],\n required: true,\n },\n scopes: {\n type: Object as () => Record,\n required: true,\n },\n },\n components: {\n Oauth2ClientList,\n Oauth2ClientEdit,\n },\n data() {\n return {\n clients: this.initialClients as Client[] || [],\n secret: '',\n secretClientId: '',\n editedClientId: '',\n };\n },\n created() {\n watch(() => MatomoUrl.hashParsed.value.idClient as string, (idClient) => {\n this.initState(idClient);\n });\n\n this.initState(MatomoUrl.hashParsed.value.idClient as string);\n },\n methods: {\n initState(idClient?: string) {\n if (!idClient) {\n this.secret = '';\n this.secretClientId = '';\n } else if (this.secretClientId && this.secretClientId !== idClient) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n this.editedClientId = idClient || '';\n },\n createClient() {\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: '0',\n });\n this.secret = '';\n this.secretClientId = '';\n },\n editClient(clientId: string) {\n if (this.secretClientId !== clientId) {\n this.secret = '';\n this.secretClientId = '';\n }\n\n MatomoUrl.updateHash({\n ...MatomoUrl.hashParsed.value,\n idClient: clientId,\n });\n },\n showList() {\n const params = {\n ...MatomoUrl.hashParsed.value,\n };\n delete params.idClient;\n this.secret = '';\n this.secretClientId = '';\n MatomoUrl.updateHash(params);\n },\n onClientSaved(payload: { client: Client; secret: string|null }) {\n const index = this.clients.findIndex(\n (client) => client.client_id === payload.client.client_id,\n );\n if (index === -1) {\n this.clients.push(payload.client);\n } else {\n this.clients.splice(index, 1, payload.client);\n }\n\n this.clients = [...this.clients].sort((left, right) => {\n const leftTime = left.updated_at ? new Date(left.updated_at).getTime() : 0;\n const rightTime = right.updated_at ? new Date(right.updated_at).getTime() : 0;\n\n if (rightTime !== leftTime) {\n return rightTime - leftTime;\n }\n\n return left.name.localeCompare(right.name);\n });\n this.secret = payload.secret || '';\n this.secretClientId = payload.secret ? payload.client.client_id : '';\n },\n onClientDeleted(clientId: string) {\n this.secret = '';\n if (this.secretClientId === clientId) {\n this.secretClientId = '';\n }\n this.clients = this.clients.filter((client) => client.client_id !== clientId);\n },\n onClientUpdated(updatedClient: Client) {\n const index = this.clients.findIndex(\n (client) => client.client_id === updatedClient.client_id,\n );\n if (index === -1) {\n return;\n }\n\n this.clients.splice(index, 1, updatedClient);\n this.clients = [...this.clients];\n },\n },\n computed: {\n isEditMode() {\n return !!this.editedClientId;\n },\n },\n});\n","import { render } from \"./Manage.vue?vue&type=template&id=3b7774ee\"\nimport script from \"./Manage.vue?vue&type=script&lang=ts\"\nexport * from \"./Manage.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script"],"sourceRoot":""} \ No newline at end of file diff --git a/vue/src/OAuthClients/List.vue b/vue/src/OAuthClients/List.vue index 5b99f9d..50d4380 100644 --- a/vue/src/OAuthClients/List.vue +++ b/vue/src/OAuthClients/List.vue @@ -45,6 +45,7 @@ {{ translate('OAuth2_AdminName') }} {{ translate('OAuth2_AdminClientType') }} {{ translate('OAuth2_AdminClientGrants') }} + {{ translate('OAuth2_AdminScope') }} {{ translate('OAuth2_AdminClientStatus') }} {{ translate('OAuth2_AdminClientId') }} {{ translate('OAuth2_AdminClientRedirects') }} @@ -61,7 +62,15 @@ {{ client.name }} {{ typeOptions[client.type] }} - {{ (client.grant_types || []).join(', ') }} + +
+ {{ getGrantTypeLabel(grantType) }} +
+ + {{ getScopeLabel(client) }} {{ @@ -108,7 +117,7 @@ - {{ translate('OAuth2_AdminNoClients') }} + {{ translate('OAuth2_AdminNoClients') }} @@ -156,6 +165,10 @@ export default defineComponent({ type: Array as PropType, required: true, }, + scopes: { + type: Object as PropType>, + required: true, + }, }, emits: ['create', 'edit', 'deleted', 'updated'], components: { @@ -172,9 +185,24 @@ export default defineComponent({ confidential: this.translate('OAuth2_AdminConfidential'), public: this.translate('OAuth2_AdminPublic'), } as Record, + grantTypeOptions: { + authorization_code: this.translate('OAuth2_AdminGrantAuthorizationCode'), + client_credentials: this.translate('OAuth2_AdminGrantClientCredentials'), + refresh_token: this.translate('OAuth2_AdminGrantRefreshToken'), + } as Record, }; }, methods: { + getShortScopeLabel(scope: string) { + const shortScopeLabels = { + 'matomo:read': this.translate('UsersManager_PrivView'), + 'matomo:write': this.translate('UsersManager_PrivWrite'), + 'matomo:admin': this.translate('UsersManager_PrivAdmin'), + 'matomo:superuser': this.translate('OAuth2_ScopeSuperUserShort'), + } as Record; + + return shortScopeLabels[scope] || this.scopes[scope] || scope; + }, showNotification(message: string, context: NotificationType['context'], type: null|NotificationType['type'] = null) { const instanceId = NotificationsStore.show({ @@ -192,6 +220,18 @@ export default defineComponent({ NotificationsStore.remove(notificationId); NotificationsStore.remove('ajaxHelper'); }, + getScopeLabel(client: Client) { + const scope = client.scopes?.[0]; + + if (!scope) { + return ''; + } + + return this.getShortScopeLabel(scope); + }, + getGrantTypeLabel(grantType: string) { + return this.grantTypeOptions[grantType] || grantType; + }, toggleClientStatus(client: Client) { const safeClientName = Matomo.helper.htmlEntities(client.name || client.client_id); this.confirmToggleLabel = client.active diff --git a/vue/src/OAuthClients/Manage.vue b/vue/src/OAuthClients/Manage.vue index 0a470bb..e97e21d 100644 --- a/vue/src/OAuthClients/Manage.vue +++ b/vue/src/OAuthClients/Manage.vue @@ -3,6 +3,7 @@