diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 856eb2823..da3ddd4df 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -245,7 +245,7 @@ public function signFPath(string $uuid): TemplateResponse { } /** - * Sign page to authenticated signer + * Sign page to unauthenticated signer * * The path is used only by frontend * @@ -259,13 +259,13 @@ public function signFPath(string $uuid): TemplateResponse { #[RequireSetupOk] #[PublicPage] #[RequireSignRequestUuid] - #[FrontpageRoute(verb: 'GET', url: '/p/sign/{uuid}/pdf')] - public function signPdf(string $uuid): TemplateResponse { + #[FrontpageRoute(verb: 'GET', url: '/p/sign/{uuid}/{path}', requirements: ['path' => '.+'])] + public function signPPath(string $uuid): TemplateResponse { return $this->sign($uuid); } /** - * Sign page to authenticated signer + * Sign page to unauthenticated signer * * The path is used only by frontend * diff --git a/openapi-full.json b/openapi-full.json index b3904e96c..c28f70883 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -1290,10 +1290,10 @@ } } }, - "/index.php/apps/libresign/p/sign/{uuid}/pdf": { + "/index.php/apps/libresign/p/sign/{uuid}/{path}": { "get": { - "operationId": "page-sign-pdf", - "summary": "Sign page to authenticated signer", + "operationId": "page-signp-path", + "summary": "Sign page to unauthenticated signer", "description": "The path is used only by frontend", "tags": [ "page" @@ -1316,6 +1316,15 @@ "schema": { "type": "string" } + }, + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } } ], "responses": { @@ -1335,7 +1344,7 @@ "/index.php/apps/libresign/p/sign/{uuid}": { "get": { "operationId": "page-sign", - "summary": "Sign page to authenticated signer", + "summary": "Sign page to unauthenticated signer", "description": "The path is used only by frontend", "tags": [ "page" diff --git a/openapi.json b/openapi.json index 9c8a12711..c6c67c491 100644 --- a/openapi.json +++ b/openapi.json @@ -1194,10 +1194,10 @@ } } }, - "/index.php/apps/libresign/p/sign/{uuid}/pdf": { + "/index.php/apps/libresign/p/sign/{uuid}/{path}": { "get": { - "operationId": "page-sign-pdf", - "summary": "Sign page to authenticated signer", + "operationId": "page-signp-path", + "summary": "Sign page to unauthenticated signer", "description": "The path is used only by frontend", "tags": [ "page" @@ -1220,6 +1220,15 @@ "schema": { "type": "string" } + }, + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^.+$" + } } ], "responses": { @@ -1239,7 +1248,7 @@ "/index.php/apps/libresign/p/sign/{uuid}": { "get": { "operationId": "page-sign", - "summary": "Sign page to authenticated signer", + "summary": "Sign page to unauthenticated signer", "description": "The path is used only by frontend", "tags": [ "page" diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index 12067bb50..850e6fda3 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -153,7 +153,7 @@ export type paths = { patch?: never; trace?: never; }; - "/index.php/apps/libresign/p/sign/{uuid}/pdf": { + "/index.php/apps/libresign/p/sign/{uuid}/{path}": { parameters: { query?: never; header?: never; @@ -161,10 +161,10 @@ export type paths = { cookie?: never; }; /** - * Sign page to authenticated signer + * Sign page to unauthenticated signer * @description The path is used only by frontend */ - get: operations["page-sign-pdf"]; + get: operations["page-signp-path"]; put?: never; post?: never; delete?: never; @@ -181,7 +181,7 @@ export type paths = { cookie?: never; }; /** - * Sign page to authenticated signer + * Sign page to unauthenticated signer * @description The path is used only by frontend */ get: operations["page-sign"]; @@ -1510,13 +1510,14 @@ export interface operations { }; }; }; - "page-sign-pdf": { + "page-signp-path": { parameters: { query?: never; header?: never; path: { /** @description Sign request uuid */ uuid: string; + path: string; }; cookie?: never; }; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 9c57983c6..b1d98ce94 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -153,7 +153,7 @@ export type paths = { patch?: never; trace?: never; }; - "/index.php/apps/libresign/p/sign/{uuid}/pdf": { + "/index.php/apps/libresign/p/sign/{uuid}/{path}": { parameters: { query?: never; header?: never; @@ -161,10 +161,10 @@ export type paths = { cookie?: never; }; /** - * Sign page to authenticated signer + * Sign page to unauthenticated signer * @description The path is used only by frontend */ - get: operations["page-sign-pdf"]; + get: operations["page-signp-path"]; put?: never; post?: never; delete?: never; @@ -181,7 +181,7 @@ export type paths = { cookie?: never; }; /** - * Sign page to authenticated signer + * Sign page to unauthenticated signer * @description The path is used only by frontend */ get: operations["page-sign"]; @@ -1364,13 +1364,14 @@ export interface operations { }; }; }; - "page-sign-pdf": { + "page-signp-path": { parameters: { query?: never; header?: never; path: { /** @description Sign request uuid */ uuid: string; + path: string; }; cookie?: never; };