Commit Graph

4 Commits

Author SHA1 Message Date
49ec9fbead Add PdfSharp font resolver for .NET 8 compatibility
Added a `PdfSharpFontResolver` class to enable font resolution
for PdfSharp in .NET 8, addressing the lack of system font
access. The resolver reads fonts from the Windows Fonts folder
and supports the Arial font family. Registered the resolver
globally in `Program.cs` using `GlobalFontSettings.FontResolver`.

Updated `Program.cs` with comments explaining the necessity of
the resolver for .NET 8. The resolver includes methods to map
font family names to specific font files and load font data.
Throws a `FileNotFoundException` if required fonts are missing.

Made minor formatting changes in `Program.cs` without altering
the `SwaggerDoc` description functionality.
2026-07-01 01:25:24 +02:00
6c142eba08 Refactor signature processing in EnvelopeReceiverPageDataService
Refactored the logic to filter and map `elements` to `signatures`
before converting them to `UnitOfLength.Point`. Removed the direct
return of `elements` and ensured that only the processed `signatures`
are converted and returned. Added a `ToList()` call to materialize
the `signatures` collection before conversion.
2026-06-29 01:29:33 +02:00
489d2808a1 Refactor EnvelopeReceiverPage for modular data handling
Refactored `EnvelopeReceiverPage.razor` to use new services for receiver authentication and data retrieval. Introduced `EnvelopeReceiverAuthorizationService` for handling JWT-based authorization and `EnvelopeReceiverPageDataService` for centralized data access and caching. Updated dependency injection in `Program.cs` to register these services.

Replaced direct service calls with `PageDataService` methods for document, signature, and receiver data retrieval. Improved logging with `ILogger` and added debug logs for token validation. Enhanced modularity, maintainability, and performance by consolidating logic and reducing coupling between components.
2026-06-29 01:26:43 +02:00
ed17852542 Add EnvelopeAuthService for SSR authentication
Introduced `EnvelopeAuthService` and `IEnvelopeAuthService` to handle server-side authentication for envelope receiver pages.

- Registered `IEnvelopeAuthService` as a scoped service in `Program.cs`.
- Implemented `EnvelopeAuthService` to validate user authentication and envelope key matching using `IHttpContextAccessor` and JWT claims.
- Added methods to retrieve the authenticated envelope key and current user (`ClaimsPrincipal`).
- Prioritized `NameIdentifier` claim for envelope key extraction, with fallback to `sub` claim.
- Documented the service and interface with XML comments for clarity.

This centralizes authentication logic, ensuring reusability and adherence to SSR best practices.
2026-06-24 15:57:06 +02:00