From c46382c18547a14910c0f4a09ce8c6420ad14618 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Thu, 27 Feb 2025 15:43:00 +1000 Subject: [PATCH 1/9] DOC-3143: update key information about trial period behaviour for document converters on Tiny Cloud. --- modules/ROOT/pages/exportpdf.adoc | 29 ++++++++++++++++-- modules/ROOT/pages/exportword.adoc | 30 ++++++++++++++++++- modules/ROOT/pages/importword.adoc | 25 +++++++++++++++- .../exportpdf_token_provider.adoc | 10 ++----- .../exportword_token_provider.adoc | 11 ++----- .../importword_token_provider.adoc | 10 ++----- 6 files changed, 85 insertions(+), 30 deletions(-) diff --git a/modules/ROOT/pages/exportpdf.adoc b/modules/ROOT/pages/exportpdf.adoc index 1fe441c19c..8a2fb0ce58 100644 --- a/modules/ROOT/pages/exportpdf.adoc +++ b/modules/ROOT/pages/exportpdf.adoc @@ -30,14 +30,37 @@ tinymce.init({ selector: 'textarea', plugins: 'exportpdf', toolbar: 'exportpdf', + exportpdf_token_provider: () => { // required when using the Export to PDF plugin with Tiny Cloud. + return fetch('http://localhost:3000/jwt', { // specify your token endpoint + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }).then(response => response.json()); + }, }); ---- +[NOTE] +For more infomation on the exportpdf_token_provider option, see xref:exportpdf.adoc#exportpdf-token-provider[exportpdf_token_provider]. + [IMPORTANT] -When using the {pluginname} plugin with the {companyname} Cloud service, JWT authentication is required to use the service. For more information on how to set up JWT authentication with {pluginname}, see examples: +==== +The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. + +* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a JSON object containing the token. + +For more information on how to set up JWT authentication with {pluginname}, see examples: -* xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[{pluginname} with JWT authentication (Node.js)] -* xref:export-to-pdf-with-jwt-authentication-php.adoc[{pluginname} with JWT authentication (PHP)] +* xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[Export to PDF with JWT authentication (Node.js)] +* xref:export-to-pdf-with-jwt-authentication-php.adoc[Export to PDF with JWT authentication (PHP)] + +**Trial period behavior:** + +* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. +* The `{plugincode}_token_provider` option is "not required" during the trial period. +* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. +* Attempting to use JWT authentication during the trial will result in an _error_. +==== == Basic setup using the self-hosted service diff --git a/modules/ROOT/pages/exportword.adoc b/modules/ROOT/pages/exportword.adoc index 683f32eec9..54728bab6c 100644 --- a/modules/ROOT/pages/exportword.adoc +++ b/modules/ROOT/pages/exportword.adoc @@ -36,15 +36,43 @@ tinymce.init({ selector: 'textarea', plugins: 'exportword', toolbar: 'exportword', + exportword_token_provider: () => { // required when using the Export to Word plugin with Tiny Cloud. + return fetch('http://localhost:3000/jwt', { // specify your token endpoint + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }).then(response => response.json()); + }, }); ---- +[NOTE] +For more infomation on the exportword_token_provider option, see xref:exportword.adoc#exportword-token-provider[exportword_token_provider] + [IMPORTANT] -When using the {pluginname} plugin with the {companyname} Cloud service, JWT authentication is required to use the service. For more information on how to set up JWT authentication with {pluginname}, see examples: +==== +The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. + +* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a JSON object containing the token. + +For more information on how to set up JWT authentication with {pluginname}, see examples: * xref:export-to-word-with-jwt-authentication-nodejs.adoc[{pluginname} with JWT authentication (Node.js)] * xref:export-to-word-with-jwt-authentication-php.adoc[{pluginname} with JWT authentication (PHP)] +**Trial period behavior:** + +* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. +* The `{plugincode}_token_provider` option is "not required" during the trial period. +* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. +* Attempting to use JWT authentication during the trial will result in an _error_. +==== + + + + + + == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `exportword_service_url` option to the URL of the service. diff --git a/modules/ROOT/pages/importword.adoc b/modules/ROOT/pages/importword.adoc index 72bdca3751..fcaf99e6bd 100644 --- a/modules/ROOT/pages/importword.adoc +++ b/modules/ROOT/pages/importword.adoc @@ -31,15 +31,38 @@ tinymce.init({ selector: 'textarea', plugins: 'importword', toolbar: 'importword', + importword_token_provider: () => { // required when using the Import from Word plugin with Tiny Cloud. + return fetch('http://localhost:3000/jwt', { // specify your token endpoint + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }).then(response => response.json()); + }, }); ---- +[NOTE] +For more infomation on the importword_token_provider option, see xref:importword.adoc#importword-token-provider[importword_token_provider]. + [IMPORTANT] -When using the {pluginname} plugin with the {companyname} Cloud service, JWT authentication is required to use the service. For more information on how to set up JWT authentication with {pluginname}, see examples: +==== +The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. + +* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a JSON object containing the token. + +For more information on how to set up JWT authentication with {pluginname}, see examples: * xref:import-from-word-with-jwt-authentication-nodejs.adoc[{pluginname} with JWT authentication (Node.js)] * xref:import-from-word-with-jwt-authentication-php.adoc[{pluginname} with JWT authentication (PHP)] +**Trial period behavior:** + +* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. +* The `{plugincode}_token_provider` option is "not required" during the trial period. +* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. +* Attempting to use JWT authentication during the trial will result in an _error_. +==== + == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `importword_service_url` option to the URL of the service. diff --git a/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc b/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc index 4f4077a310..e0aaf7256b 100644 --- a/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc +++ b/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc @@ -15,17 +15,11 @@ tinymce.init({ selector: 'textarea', plugins: 'exportpdf', toolbar: 'exportpdf', - exportpdf_token_provider: () => { + exportpdf_token_provider: () => { // required when using the Export to PDF plugin with Tiny Cloud. return fetch('http://localhost:3000/jwt', { // specify your token endpoint method: 'POST', headers: { 'Content-Type': 'application/json' }, }).then(response => response.json()); }, }); ----- - -[NOTE] -The `exportpdf_token_provider` option is required when using the {companyname} Cloud service. For more information on how to set up JWT authentication with {pluginname}, see examples: - -* xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[Export to PDF with JWT authentication (Node.js)] -* xref:export-to-pdf-with-jwt-authentication-php.adoc[Export to PDF with JWT authentication (PHP)] \ No newline at end of file +---- \ No newline at end of file diff --git a/modules/ROOT/partials/configuration/exportword_token_provider.adoc b/modules/ROOT/partials/configuration/exportword_token_provider.adoc index 0638af7164..312b5675a6 100644 --- a/modules/ROOT/partials/configuration/exportword_token_provider.adoc +++ b/modules/ROOT/partials/configuration/exportword_token_provider.adoc @@ -15,18 +15,11 @@ tinymce.init({ selector: 'textarea', plugins: 'exportword', toolbar: 'exportword', - exportword_token_provider: () => { + exportword_token_provider: () => { // required when using the Export to Word plugin with Tiny Cloud. return fetch('http://localhost:3000/jwt', { // specify your token endpoint method: 'POST', headers: { 'Content-Type': 'application/json' }, }).then(response => response.json()); }, }); ----- - - -[NOTE] -The `exportword_token_provider` option is required when using the {companyname} Cloud service. For more information on how to set up JWT authentication with {pluginname}, see examples: - -* xref:export-to-word-with-jwt-authentication-nodejs.adoc[Export to Word with JWT authentication (Node.js)] -* xref:export-to-word-with-jwt-authentication-php.adoc[Export to Word with JWT authentication (PHP)] \ No newline at end of file +---- \ No newline at end of file diff --git a/modules/ROOT/partials/configuration/importword_token_provider.adoc b/modules/ROOT/partials/configuration/importword_token_provider.adoc index cb4bff5dc4..9042582682 100644 --- a/modules/ROOT/partials/configuration/importword_token_provider.adoc +++ b/modules/ROOT/partials/configuration/importword_token_provider.adoc @@ -15,17 +15,11 @@ tinymce.init({ selector: 'textarea', plugins: 'importword', toolbar: 'importword', - importword_token_provider: () => { + importword_token_provider: () => { // required when using the Import from Word plugin with Tiny Cloud. return fetch('http://localhost:3000/jwt', { // specify your token endpoint method: 'POST', headers: { 'Content-Type': 'application/json' }, }).then(response => response.json()); }, }); ----- - -[NOTE] -The `importword_token_provider` option is required when using the {companyname} Cloud service. For more information on how to set up JWT authentication with {pluginname}, see examples: - -* xref:import-from-word-with-jwt-authentication-nodejs.adoc[Import to Word with JWT authentication (Node.js)] -* xref:import-from-word-with-jwt-authentication-php.adoc[Import to Word with JWT authentication (PHP)] \ No newline at end of file +---- \ No newline at end of file From 489a5fb6895c9f3104d349f85b094362684e4ee3 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Fri, 7 Mar 2025 15:00:17 +1000 Subject: [PATCH 2/9] Update modules/ROOT/pages/exportpdf.adoc Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com> --- modules/ROOT/pages/exportpdf.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/exportpdf.adoc b/modules/ROOT/pages/exportpdf.adoc index 8a2fb0ce58..32826eedaa 100644 --- a/modules/ROOT/pages/exportpdf.adoc +++ b/modules/ROOT/pages/exportpdf.adoc @@ -30,7 +30,9 @@ tinymce.init({ selector: 'textarea', plugins: 'exportpdf', toolbar: 'exportpdf', - exportpdf_token_provider: () => { // required when using the Export to PDF plugin with Tiny Cloud. +// Below option is only required when using the cloud-based Export to PDF plugin from Tiny.Cloud. +// Avoid setting it up during the trial period. + exportpdf_token_provider: () => { return fetch('http://localhost:3000/jwt', { // specify your token endpoint method: 'POST', headers: { 'Content-Type': 'application/json' }, From a2401a89f73c32bfa49b417169a65f722a639d72 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Fri, 7 Mar 2025 15:00:30 +1000 Subject: [PATCH 3/9] Update modules/ROOT/pages/exportword.adoc Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com> --- modules/ROOT/pages/exportword.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/exportword.adoc b/modules/ROOT/pages/exportword.adoc index 54728bab6c..a1a608af8c 100644 --- a/modules/ROOT/pages/exportword.adoc +++ b/modules/ROOT/pages/exportword.adoc @@ -36,7 +36,9 @@ tinymce.init({ selector: 'textarea', plugins: 'exportword', toolbar: 'exportword', - exportword_token_provider: () => { // required when using the Export to Word plugin with Tiny Cloud. +// Below option is only required when using the cloud-based Export to Word plugin from Tiny.Cloud. +// Avoid setting it up during the trial period. + exportword_token_provider: () => { return fetch('http://localhost:3000/jwt', { // specify your token endpoint method: 'POST', headers: { 'Content-Type': 'application/json' }, From 2615a439eba18b097930fd72c80fc189d3e73782 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Fri, 7 Mar 2025 15:00:43 +1000 Subject: [PATCH 4/9] Update modules/ROOT/pages/importword.adoc Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com> --- modules/ROOT/pages/importword.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ROOT/pages/importword.adoc b/modules/ROOT/pages/importword.adoc index fcaf99e6bd..fe40442133 100644 --- a/modules/ROOT/pages/importword.adoc +++ b/modules/ROOT/pages/importword.adoc @@ -31,6 +31,8 @@ tinymce.init({ selector: 'textarea', plugins: 'importword', toolbar: 'importword', +// Below option is only required when using the cloud-based Import from Word plugin from Tiny.Cloud. +// Avoid setting it up during the trial period. importword_token_provider: () => { // required when using the Import from Word plugin with Tiny Cloud. return fetch('http://localhost:3000/jwt', { // specify your token endpoint method: 'POST', From 1e35fcc45a0d9ffcdd19921c2a4950bc9d8e5853 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Tue, 11 Mar 2025 11:07:47 +1000 Subject: [PATCH 5/9] DOC-3143: add partial file for expected data structure for auth token. --- modules/ROOT/pages/exportpdf.adoc | 4 +++- modules/ROOT/pages/exportword.adoc | 4 +++- modules/ROOT/pages/importword.adoc | 4 +++- ...t-converters-jwt-expected-data-structure.adoc | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc diff --git a/modules/ROOT/pages/exportpdf.adoc b/modules/ROOT/pages/exportpdf.adoc index 32826eedaa..01c7e7b24f 100644 --- a/modules/ROOT/pages/exportpdf.adoc +++ b/modules/ROOT/pages/exportpdf.adoc @@ -49,7 +49,7 @@ For more infomation on the exportpdf_token_provider option, see xref:exportpdf.a The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. * Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a JSON object containing the token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[valid JSON object] containing the token. For more information on how to set up JWT authentication with {pluginname}, see examples: @@ -64,6 +64,8 @@ For more information on how to set up JWT authentication with {pluginname}, see * Attempting to use JWT authentication during the trial will result in an _error_. ==== +include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] + == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `exportpdf_service_url` option to the URL of the service. diff --git a/modules/ROOT/pages/exportword.adoc b/modules/ROOT/pages/exportword.adoc index a1a608af8c..5adfb898c5 100644 --- a/modules/ROOT/pages/exportword.adoc +++ b/modules/ROOT/pages/exportword.adoc @@ -55,7 +55,7 @@ For more infomation on the exportword_token_provider option, see xref:exportword The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. * Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a JSON object containing the token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:exportword.adoc#data-structure[valid JSON object] containing the token. For more information on how to set up JWT authentication with {pluginname}, see examples: @@ -70,6 +70,8 @@ For more information on how to set up JWT authentication with {pluginname}, see * Attempting to use JWT authentication during the trial will result in an _error_. ==== +include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] + diff --git a/modules/ROOT/pages/importword.adoc b/modules/ROOT/pages/importword.adoc index fe40442133..3e2ac49620 100644 --- a/modules/ROOT/pages/importword.adoc +++ b/modules/ROOT/pages/importword.adoc @@ -50,7 +50,7 @@ For more infomation on the importword_token_provider option, see xref:importword The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. * Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a JSON object containing the token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[valid JSON object] containing the token. For more information on how to set up JWT authentication with {pluginname}, see examples: @@ -65,6 +65,8 @@ For more information on how to set up JWT authentication with {pluginname}, see * Attempting to use JWT authentication during the trial will result in an _error_. ==== +include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] + == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `importword_service_url` option to the URL of the service. diff --git a/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc b/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc new file mode 100644 index 0000000000..5733f27929 --- /dev/null +++ b/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc @@ -0,0 +1,16 @@ +== Data structure + +The JSON data containing the valid encoded token must match the following structure: + +[source,json] +---- +{ + "token": "" +} +---- + +[cols="1,1,1,3",options="header"] +|=== +|Field |Type |Required? |Description +|`+token+` |`+string+` |required |A Base64-encoded JSON Web Token (JWT) used for authentication and authorization. +|=== \ No newline at end of file From 19123f2a512777015c51e0ea2d5a9b1a082a5c5f Mon Sep 17 00:00:00 2001 From: tiny-ben-tran Date: Tue, 11 Mar 2025 11:56:13 +1030 Subject: [PATCH 6/9] Update modules/ROOT/pages/exportpdf.adoc --- modules/ROOT/pages/exportpdf.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/exportpdf.adoc b/modules/ROOT/pages/exportpdf.adoc index 01c7e7b24f..58414c5e90 100644 --- a/modules/ROOT/pages/exportpdf.adoc +++ b/modules/ROOT/pages/exportpdf.adoc @@ -49,7 +49,7 @@ For more infomation on the exportpdf_token_provider option, see xref:exportpdf.a The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. * Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[valid JSON object] containing the token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[JSON] containing the token. For more information on how to set up JWT authentication with {pluginname}, see examples: From 137d392e1b355aaf9d51f888313a0b15de863133 Mon Sep 17 00:00:00 2001 From: tiny-ben-tran Date: Tue, 11 Mar 2025 11:56:27 +1030 Subject: [PATCH 7/9] Update modules/ROOT/pages/exportword.adoc --- modules/ROOT/pages/exportword.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/exportword.adoc b/modules/ROOT/pages/exportword.adoc index 5adfb898c5..56445a4176 100644 --- a/modules/ROOT/pages/exportword.adoc +++ b/modules/ROOT/pages/exportword.adoc @@ -55,7 +55,7 @@ For more infomation on the exportword_token_provider option, see xref:exportword The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. * Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:exportword.adoc#data-structure[valid JSON object] containing the token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:exportword.adoc#data-structure[JSON] containing the token. For more information on how to set up JWT authentication with {pluginname}, see examples: From 86d8a63ea1d28fbcfef9c326db1010076ab7b4be Mon Sep 17 00:00:00 2001 From: tiny-ben-tran Date: Tue, 11 Mar 2025 11:56:37 +1030 Subject: [PATCH 8/9] Update modules/ROOT/pages/importword.adoc --- modules/ROOT/pages/importword.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/importword.adoc b/modules/ROOT/pages/importword.adoc index 3e2ac49620..22426e3087 100644 --- a/modules/ROOT/pages/importword.adoc +++ b/modules/ROOT/pages/importword.adoc @@ -50,7 +50,7 @@ For more infomation on the importword_token_provider option, see xref:importword The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. * Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[valid JSON object] containing the token. +* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[JSON] containing the token. For more information on how to set up JWT authentication with {pluginname}, see examples: From 77094bd8d8f6f1d5e7f225c461f00fe52c145639 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Wed, 12 Mar 2025 11:19:23 +1000 Subject: [PATCH 9/9] Update JWT authentication documentation across export and import plugins including use of partials. --- modules/ROOT/pages/exportpdf.adoc | 29 +++--------------- modules/ROOT/pages/exportword.adoc | 30 ++----------------- modules/ROOT/pages/importword.adoc | 26 ++-------------- .../exportpdf_token_provider.adoc | 6 +++- .../exportword_token_provider.adoc | 6 +++- .../importword_token_provider.adoc | 6 +++- ...onverters-jwt-expected-data-structure.adoc | 9 +++--- ...admon-jwt-authentication-requirements.adoc | 18 +++++++++++ 8 files changed, 48 insertions(+), 82 deletions(-) create mode 100644 modules/ROOT/partials/misc/admon-jwt-authentication-requirements.adoc diff --git a/modules/ROOT/pages/exportpdf.adoc b/modules/ROOT/pages/exportpdf.adoc index 58414c5e90..caed2284ce 100644 --- a/modules/ROOT/pages/exportpdf.adoc +++ b/modules/ROOT/pages/exportpdf.adoc @@ -1,6 +1,7 @@ = {pluginname} plugin :plugincode: exportpdf :pluginname: Export to PDF +:pluginfilename: export-to-pdf :navtitle: {pluginname} :description: The {pluginname} feature provides the ability to generate a PDF file directly from the editor. :description_short: Generate a PDF file directly from the editor. @@ -22,8 +23,7 @@ liveDemo::exportpdf[] To add the {pluginname} plugin to the editor, add `{plugincode}` to the `plugins` option in the editor configuration. -For example: - +.Example: [source,js] ---- tinymce.init({ @@ -41,37 +41,16 @@ tinymce.init({ }); ---- -[NOTE] For more infomation on the exportpdf_token_provider option, see xref:exportpdf.adoc#exportpdf-token-provider[exportpdf_token_provider]. -[IMPORTANT] -==== -The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. - -* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[JSON] containing the token. - -For more information on how to set up JWT authentication with {pluginname}, see examples: +include::partial$misc/admon-jwt-authentication-requirements.adoc[] -* xref:export-to-pdf-with-jwt-authentication-nodejs.adoc[Export to PDF with JWT authentication (Node.js)] -* xref:export-to-pdf-with-jwt-authentication-php.adoc[Export to PDF with JWT authentication (PHP)] - -**Trial period behavior:** - -* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. -* The `{plugincode}_token_provider` option is "not required" during the trial period. -* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. -* Attempting to use JWT authentication during the trial will result in an _error_. -==== - -include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `exportpdf_service_url` option to the URL of the service. -For example: - +.Example: [source,js] ---- tinymce.init({ diff --git a/modules/ROOT/pages/exportword.adoc b/modules/ROOT/pages/exportword.adoc index 56445a4176..80188b1a76 100644 --- a/modules/ROOT/pages/exportword.adoc +++ b/modules/ROOT/pages/exportword.adoc @@ -1,6 +1,7 @@ = {pluginname} plugin :plugincode: exportword :pluginname: Export to Word +:pluginfilename: export-to-word :navtitle: {pluginname} :description: The {pluginname} feature lets you generate a .docx (Microsoft Word document) file directly from the editor. :description_short: Generate a .docx file directly from the editor. @@ -47,41 +48,16 @@ tinymce.init({ }); ---- -[NOTE] For more infomation on the exportword_token_provider option, see xref:exportword.adoc#exportword-token-provider[exportword_token_provider] -[IMPORTANT] -==== -The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. - -* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:exportword.adoc#data-structure[JSON] containing the token. - -For more information on how to set up JWT authentication with {pluginname}, see examples: - -* xref:export-to-word-with-jwt-authentication-nodejs.adoc[{pluginname} with JWT authentication (Node.js)] -* xref:export-to-word-with-jwt-authentication-php.adoc[{pluginname} with JWT authentication (PHP)] - -**Trial period behavior:** - -* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. -* The `{plugincode}_token_provider` option is "not required" during the trial period. -* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. -* Attempting to use JWT authentication during the trial will result in an _error_. -==== - -include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] - - - - +include::partial$misc/admon-jwt-authentication-requirements.adoc[] == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `exportword_service_url` option to the URL of the service. -For example: +.Example: [source,js] ---- tinymce.init({ diff --git a/modules/ROOT/pages/importword.adoc b/modules/ROOT/pages/importword.adoc index 22426e3087..d31a2b5959 100644 --- a/modules/ROOT/pages/importword.adoc +++ b/modules/ROOT/pages/importword.adoc @@ -2,6 +2,7 @@ = {pluginname} plugin :plugincode: importword :pluginname: Import from Word +:pluginfilename: import-from-word :navtitle: {pluginname} :description: Provides a way to import .docx (Microsoft Word documents) or .dotx (Microsoft Word templates) files into the editor. :description_short: Import .docx or .dotx files into the editor. @@ -42,37 +43,16 @@ tinymce.init({ }); ---- -[NOTE] For more infomation on the importword_token_provider option, see xref:importword.adoc#importword-token-provider[importword_token_provider]. -[IMPORTANT] -==== -The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. - -* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. -* If hosting locally, use the format `+http://localhost:[port]/jwt+`, ensuring the endpoint returns a xref:importword.adoc#data-structure[JSON] containing the token. - -For more information on how to set up JWT authentication with {pluginname}, see examples: - -* xref:import-from-word-with-jwt-authentication-nodejs.adoc[{pluginname} with JWT authentication (Node.js)] -* xref:import-from-word-with-jwt-authentication-php.adoc[{pluginname} with JWT authentication (PHP)] +include::partial$misc/admon-jwt-authentication-requirements.adoc[] -**Trial period behavior:** - -* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. -* The `{plugincode}_token_provider` option is "not required" during the trial period. -* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. -* Attempting to use JWT authentication during the trial will result in an _error_. -==== - -include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] == Basic setup using the self-hosted service To use the self-hosted version of the {pluginname} plugin, you need to set the `importword_service_url` option to the URL of the service. -For example: - +.Example: [source,js] ---- tinymce.init({ diff --git a/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc b/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc index e0aaf7256b..649e8837cb 100644 --- a/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc +++ b/modules/ROOT/partials/configuration/exportpdf_token_provider.adoc @@ -7,6 +7,8 @@ The `exportpdf_token_provider` option enables integration with a token-based aut *Default value:* `undefined` +*Return data:* xref:exportpdf.adoc#data-structure[`Token` object] + === Example: using `exportpdf_token_provider` [source,js] @@ -22,4 +24,6 @@ tinymce.init({ }).then(response => response.json()); }, }); ----- \ No newline at end of file +---- + +include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] \ No newline at end of file diff --git a/modules/ROOT/partials/configuration/exportword_token_provider.adoc b/modules/ROOT/partials/configuration/exportword_token_provider.adoc index 312b5675a6..a1ba015c71 100644 --- a/modules/ROOT/partials/configuration/exportword_token_provider.adoc +++ b/modules/ROOT/partials/configuration/exportword_token_provider.adoc @@ -7,6 +7,8 @@ The `exportword_token_provider` option enables integration with a token-based au *Default value:* `undefined` +*Return data:* xref:exportword.adoc#data-structure[`Token` object] + === Example: using `exportword_token_provider` [source,js] @@ -22,4 +24,6 @@ tinymce.init({ }).then(response => response.json()); }, }); ----- \ No newline at end of file +---- + +include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] \ No newline at end of file diff --git a/modules/ROOT/partials/configuration/importword_token_provider.adoc b/modules/ROOT/partials/configuration/importword_token_provider.adoc index 9042582682..137e29016a 100644 --- a/modules/ROOT/partials/configuration/importword_token_provider.adoc +++ b/modules/ROOT/partials/configuration/importword_token_provider.adoc @@ -7,6 +7,8 @@ The `importword_token_provider` option enables integration with a token-based au *Default value:* `undefined` +*Return data:* xref:importword.adoc#data-structure[`Token` object] + === Example: using `importword_token_provider` [source,js] @@ -22,4 +24,6 @@ tinymce.init({ }).then(response => response.json()); }, }); ----- \ No newline at end of file +---- + +include::partial$misc/admon-document-converters-jwt-expected-data-structure.adoc[] \ No newline at end of file diff --git a/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc b/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc index 5733f27929..78029107b7 100644 --- a/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc +++ b/modules/ROOT/partials/misc/admon-document-converters-jwt-expected-data-structure.adoc @@ -1,11 +1,12 @@ -== Data structure +[[data-structure]] +=== Data structure for the JWT token -The JSON data containing the valid encoded token must match the following structure: +The object containing the valid encoded token must match the following structure: -[source,json] +[source,js] ---- { - "token": "" + token: "" } ---- diff --git a/modules/ROOT/partials/misc/admon-jwt-authentication-requirements.adoc b/modules/ROOT/partials/misc/admon-jwt-authentication-requirements.adoc new file mode 100644 index 0000000000..d4445f6186 --- /dev/null +++ b/modules/ROOT/partials/misc/admon-jwt-authentication-requirements.adoc @@ -0,0 +1,18 @@ +[IMPORTANT] +==== +The {pluginname} plugin **requires** JWT authentication when using the {companyname} Cloud service. + +* Configure the `{plugincode}_token_provider` option to specify the endpoint for retrieving a valid JWT token. + +For more information on how to set up JWT authentication with {pluginname}, see examples: + +* xref:{pluginfilename}-with-jwt-authentication-nodejs.adoc[{pluginname} with JWT authentication (Node.js)] +* xref:{pluginfilename}-with-jwt-authentication-php.adoc[{pluginname} with JWT authentication (PHP)] + +**Trial period behavior:** + +* The {pluginname} plugin runs in evaluation mode and adds a watermark to exported content. +* The `{plugincode}_token_provider` option is "not required" during the trial period. +* If the trial period "expires" or the plugin lacks the necessary entitlement, it becomes _non-functional_. +* Attempting to use JWT authentication during the trial will result in an _error_. +==== \ No newline at end of file