Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Controller/IdDocsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\Attribute\RequestHeader;
use OCP\AppFramework\Http\DataResponse;
use OCP\IL10N;
use OCP\IRequest;
Expand Down Expand Up @@ -63,6 +64,7 @@ public function __construct(
#[AnonRateLimit(limit: 30, period: 60)]
#[NoAdminRequired]
#[NoCSRFRequired]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[OpenAPI(tags: ['identity'])]
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/id-docs', requirements: ['apiVersion' => '(v1)'])]
Expand Down Expand Up @@ -113,6 +115,7 @@ public function addFiles(array $files): DataResponse {
#[AnonRateLimit(limit: 30, period: 60)]
#[NoAdminRequired]
#[NoCSRFRequired]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[OpenAPI(tags: ['identity'])]
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/id-docs/{nodeId}', requirements: ['apiVersion' => '(v1)'])]
Expand Down Expand Up @@ -153,6 +156,7 @@ public function delete(int $nodeId, ?string $uuid = null): DataResponse {
#[PublicPage]
#[AnonRateLimit(limit: 30, period: 60)]
#[NoCSRFRequired]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[OpenAPI(tags: ['identity'])]
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/id-docs', requirements: ['apiVersion' => '(v1)'])]
Expand Down
2 changes: 2 additions & 0 deletions lib/Controller/SignFileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\Attribute\RequestHeader;
use OCP\AppFramework\Http\DataResponse;
use OCP\IL10N;
use OCP\IRequest;
Expand Down Expand Up @@ -488,6 +489,7 @@ public function requestCodeBySignerUuid(
*/
#[NoAdminRequired]
#[NoCSRFRequired]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSigner]
#[PublicPage]
#[OpenAPI(tags: ['signing'])]
Expand Down
3 changes: 3 additions & 0 deletions lib/Controller/SignatureElementsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public function useSavedSignatureElements(string $token = ''): DataResponse {
#[NoAdminRequired]
#[PublicPage]
#[NoCSRFRequired]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[OpenAPI(tags: ['appearance'])]
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/signature/elements/preview/{nodeId}', requirements: ['apiVersion' => '(v1)'])]
Expand Down Expand Up @@ -322,6 +323,7 @@ public function getSignatureElement(int $nodeId): DataResponse {
#[NoAdminRequired]
#[PublicPage]
#[NoCSRFRequired]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[OpenAPI(tags: ['appearance'])]
#[ApiRoute(verb: 'PATCH', url: '/api/{apiVersion}/signature/elements/{nodeId}', requirements: ['apiVersion' => '(v1)'])]
Expand Down Expand Up @@ -380,6 +382,7 @@ public function patchSignatureElement(int $nodeId, string $type = '', array $fil
#[NoAdminRequired]
#[NoCSRFRequired]
#[PublicPage]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[OpenAPI(tags: ['appearance'])]
#[ApiRoute(verb: 'DELETE', url: '/api/{apiVersion}/signature/elements/{nodeId}', requirements: ['apiVersion' => '(v1)'])]
Expand Down
56 changes: 56 additions & 0 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -8367,6 +8367,14 @@
"default": "v1"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -8510,6 +8518,14 @@
"default": null
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -8634,6 +8650,14 @@
"default": null
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -13891,6 +13915,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -14379,6 +14411,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -14638,6 +14678,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -14750,6 +14798,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down
56 changes: 56 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7630,6 +7630,14 @@
"default": "v1"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -7773,6 +7781,14 @@
"default": null
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -7897,6 +7913,14 @@
"default": null
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -13154,6 +13178,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -13642,6 +13674,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -13901,6 +13941,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down Expand Up @@ -14013,6 +14061,14 @@
"format": "int64"
}
},
{
"name": "libresign-sign-request-uuid",
"in": "header",
"description": "The UUID of the sign request, used to identify the request",
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
Expand Down
14 changes: 14 additions & 0 deletions src/types/openapi/openapi-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4340,6 +4340,8 @@ export interface operations {
length?: number | null;
};
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down Expand Up @@ -4384,6 +4386,8 @@ export interface operations {
parameters: {
query?: never;
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down Expand Up @@ -4438,6 +4442,8 @@ export interface operations {
uuid?: string | null;
};
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down Expand Up @@ -6671,6 +6677,8 @@ export interface operations {
parameters: {
query?: never;
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down Expand Up @@ -6886,6 +6894,8 @@ export interface operations {
parameters: {
query?: never;
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down Expand Up @@ -6987,6 +6997,8 @@ export interface operations {
parameters: {
query?: never;
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down Expand Up @@ -7033,6 +7045,8 @@ export interface operations {
parameters: {
query?: never;
header: {
/** @description The UUID of the sign request, used to identify the request */
"libresign-sign-request-uuid"?: string;
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
Expand Down
Loading
Loading