diff --git a/img/file-signature-solid.svg b/img/file-signature-solid.svg deleted file mode 100644 index 6c8b7f9f33..0000000000 --- a/img/file-signature-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/img/info-circle-solid.svg b/img/info-circle-solid.svg deleted file mode 100644 index 4d2e4aa88d..0000000000 --- a/img/info-circle-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index 48af32f2e8..e28042c1d7 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -143,11 +143,18 @@ * emailToken?: LibresignSignatureMethodEmailToken, * password?: LibresignSignatureMethodPassword, * } + * @psalm-type LibresignNotify = array{ + * date: int, + * method: "activity"|"notify"|"mail", + * } * @psalm-type LibresignSigner = array{ * description: ?string, * displayName: string, * request_sign_date: string, * email?: string, + * remote_address?: string, + * user_agent?: string, + * notify?: LibresignNotify[], * userId?: string, * signed: ?string, * sign_date?: ?string, diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index fd991d9670..d71955369b 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -187,6 +187,16 @@ private function getSigners(): array { ->setTimestamp($signer->getCreatedAt()) ->format('Y-m-d H:i:s'), ]; + $metadata = $signer->getMetadata(); + if (!empty($metadata['remote-address'])) { + $signatureToShow['remote_address'] = $metadata['remote-address']; + } + if (!empty($metadata['user-agent'])) { + $signatureToShow['user_agent'] = $metadata['user-agent']; + } + if (!empty($metadata['notify'])) { + $signatureToShow['notify'] = $metadata['notify']; + } if ($signer->getSigned()) { $data['sign_date'] = (new \DateTime()) ->setTimestamp($signer->getSigned()) diff --git a/openapi-full.json b/openapi-full.json index fdd71cc001..2d5199b7d3 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -465,6 +465,27 @@ } } }, + "Notify": { + "type": "object", + "required": [ + "date", + "method" + ], + "properties": { + "date": { + "type": "integer", + "format": "int64" + }, + "method": { + "type": "string", + "enum": [ + "activity", + "notify", + "mail" + ] + } + } + }, "OCSMeta": { "type": "object", "required": [ @@ -704,6 +725,18 @@ "email": { "type": "string" }, + "remote_address": { + "type": "string" + }, + "user_agent": { + "type": "string" + }, + "notify": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notify" + } + }, "userId": { "type": "string" }, diff --git a/openapi.json b/openapi.json index 37090de13c..9001abafcf 100644 --- a/openapi.json +++ b/openapi.json @@ -402,6 +402,27 @@ } } }, + "Notify": { + "type": "object", + "required": [ + "date", + "method" + ], + "properties": { + "date": { + "type": "integer", + "format": "int64" + }, + "method": { + "type": "string", + "enum": [ + "activity", + "notify", + "mail" + ] + } + } + }, "OCSMeta": { "type": "object", "required": [ @@ -608,6 +629,18 @@ "email": { "type": "string" }, + "remote_address": { + "type": "string" + }, + "user_agent": { + "type": "string" + }, + "notify": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Notify" + } + }, "userId": { "type": "string" }, diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index 45fc4e040a..08820028e9 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -1172,6 +1172,12 @@ export type components = { path: string; type: string; }; + Notify: { + /** Format: int64 */ + date: number; + /** @enum {string} */ + method: "activity" | "notify" | "mail"; + }; OCSMeta: { status: string; statuscode: number; @@ -1234,6 +1240,9 @@ export type components = { displayName: string; request_sign_date: string; email?: string; + remote_address?: string; + user_agent?: string; + notify?: components["schemas"]["Notify"][]; userId?: string; signed: string | null; sign_date?: string | null; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index ef3d3ce084..eb79f9e0d6 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -1034,6 +1034,12 @@ export type components = { path: string; type: string; }; + Notify: { + /** Format: int64 */ + date: number; + /** @enum {string} */ + method: "activity" | "notify" | "mail"; + }; OCSMeta: { status: string; statuscode: number; @@ -1088,6 +1094,9 @@ export type components = { displayName: string; request_sign_date: string; email?: string; + remote_address?: string; + user_agent?: string; + notify?: components["schemas"]["Notify"][]; userId?: string; signed: string | null; sign_date?: string | null; diff --git a/src/views/Validation.vue b/src/views/Validation.vue index 88091a7b40..c3996b607d 100644 --- a/src/views/Validation.vue +++ b/src/views/Validation.vue @@ -4,68 +4,132 @@ -->