Refactored the handling of `senderDoc.ByteData` by replacing
the ternary operator with an explicit `if` statement for better
readability. Added a `Content-Disposition` header to ensure
the file is displayed inline with a proper filename. Updated
the MIME type of the file response from `application/octet-stream`
to `application/pdf` to reflect the expected content type.
The `UseDbMigration` setting in the `appsettings.json` file was updated from `true` to `false`. This change disables automatic application of database migrations, potentially requiring manual intervention or an alternative approach for managing schema updates.
Added a new `GetEnvelopeReceiverOfReceiver` method in the
`EnvelopeReceiverController` to retrieve an envelope receiver
based on the provided `envelopeKey`. The method is secured
with the `Receiver` authorization policy and uses the
`_mediator.Send` method to process a `ReadEnvelopeReceiverQuery`.
Included the `Microsoft.Extensions.Options` namespace to
support potential configuration needs. Added XML documentation
placeholders for the new method.
Updated DocumentController to include a new GetDocumentOfReceiver
endpoint for retrieving envelope documents. Added authorization
based on the Receiver policy and implemented error handling for
invalid or missing EnvelopeId claims. Integrated ILogger to log
errors and provide detailed diagnostics. Included necessary
namespace imports to support the new functionality.
Enhanced token validation logic by introducing an `OnTokenValidated` event handler. This ensures the `envelopeKey` in the request path matches the token's subject (`sub` claim). Added `return Task.CompletedTask;` to complete asynchronous operations. These changes improve security by preventing mismatches or unauthorized access.
Added `AddEnvelopeReceiverLoginOperation` to `AuthProxyDocumentFilter` to define a new Swagger operation for the `/api/Auth/envelope-receiver/{key}` endpoint. Introduced the `EnvelopeReceiverLogin` record for the request body. Updated `yarp.json` to configure routing for the new endpoint, ensuring the `cookie` query parameter is always set to `true`. Modified `Apply` to include the new operation in Swagger documentation.
Added two new endpoints to `AuthController`: `LogoutEnvelopeReceiver` for removing a specific per-envelope receiver cookie and `LogoutAllEnvelopeReceivers` for clearing all such cookies. Updated `DigitalData.Auth.Claims` package to version 1.0.3. Introduced new `using` directives to support the added functionality. Included XML documentation for the new endpoints to improve code clarity.
Introduced a new `EnvelopeReceiverJwt` authentication scheme to support per-envelope JWT validation using cookies specific to envelope keys. Added the `CheckEnvelopeReceiver` endpoint in `AuthController.cs` to validate these tokens, protected by the `AuthPolicy.Receiver` policy.
Configured the `EnvelopeReceiverJwt` scheme to dynamically resolve issuer signing keys and validate tokens. Enhanced `JwtBearerEvents.OnMessageReceived` to extract envelope keys from the request path and retrieve tokens from corresponding cookies.
Updated the `AuthPolicy.Receiver` policy to use the `EnvelopeReceiverJwt` scheme, ensuring isolated authentication for per-envelope scenarios. Added XML documentation for the `CheckEnvelopeReceiver` method.
Introduce a new `CheckReceiver` action method in `AuthController`.
This method is protected by the `Receiver` authorization policy
and handles GET requests to the `check-receiver/{envelopeKey}` route.
It accepts an `envelopeKey` parameter from the route and currently
returns an HTTP 200 OK response.
- Added `using DigitalData.Auth.Claims` to support claims handling.
- Improved EF Core DbContext comment for better clarity.
- Added logic to dynamically select connection strings based on
`MIGRATION_TEST_MODE` or `UseDbMigration` configuration.
- Updated `AuthPolicy.Receiver` to include the `"receiver"` role.
Added a reference to the `DigitalData.Auth.Claims` package (version 1.0.1) in the `EnvelopeGenerator.API.csproj` file. This introduces functionality related to handling authentication claims in the project.
Updated project version to 1.2.0.3 in `EnvelopeGenerator.DependencyInjection.csproj`.
Replaced line endings in `_DepDlls` for consistency. Added a new
`RebuildDependenciesBeforePack` target to ensure all dependencies
are rebuilt for `net7.0`, `net8.0`, and `net9.0` before packaging.
Improved formatting in `BundleReferencedDlls` for better readability.
Bump the project version from 1.1.1 to 1.2.0 in the `EnvelopeGenerator.DependencyInjection.csproj` file. Updated the `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` properties to reflect the new version.
Introduced `ReadEnvelopeReceiverSecretQuery` to fetch sensitive
fields (e.g., access code, phone number) for envelope receivers.
Added extension methods for dispatching the query via `IMediator`
and implemented `ReadEnvelopeReceiverSecretQueryHandler` to
process the query using repositories and AutoMapper.
Updated `EnvelopeController` with a new HTTP GET endpoint
`EnvelopeReceiverWithSecretByMediatr` to expose the query
functionality. This endpoint returns sensitive data as
`EnvelopeReceiverSecretDto` or a 404 response if no match is found.
These changes improve modularity, testability, and separation of
concerns by leveraging MediatR and CQRS patterns.
Updated project version from 1.1.0 to 1.1.1 in `EnvelopeGenerator.DependencyInjection.csproj`. This includes changes to `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` properties. The update reflects minor improvements or bug fixes while maintaining backward compatibility.
Restructured `EnvelopeGenerator.DependencyInjection.csproj` to:
- Add multiple `PackageReference` entries for application services, ORM/Database, security/identity, utilities, and DI abstractions.
- Introduce conditional `ItemGroup` sections for `net7.0`, `net8.0`, and `net9.0` with framework-specific package versions.
- Move `UserManager` package reference to align with the updated dependency structure.
- Update comments for clarity, including replacing a Turkish comment with an English one.
- Add a comment explaining the rationale for centralizing `PackageReference` declarations to ensure correct `.nuspec` generation and simplify consumption.
Updated the project version from 1.0.1 to 1.1.0 in the `EnvelopeGenerator.DependencyInjection.csproj` file. This includes changes to the `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` properties, reflecting the addition of new features or improvements.
Introduced `EnvelopeGeneratorOptions` and `SqlCacheOptions` to enable fine-grained control over optional service registrations in `AddEnvelopeGenerator`. Updated `AddEnvelopeGenerator` to conditionally register services like `HttpContextAccessor`, `DistributedSqlServerCache`, `Dispatcher`, `MemoryCache`, and `UserManager` based on these options.
Updated `DependencyInjection.csproj` to include necessary framework references and package dependencies. Simplified `Program.cs` by consolidating service registrations into `AddEnvelopeGenerator`, reducing boilerplate and improving maintainability.
Improved extensibility by centralizing service registration logic, allowing consuming projects to customize configurations without modifying the core library. Updated documentation and removed unused directives.
Centralized dependency injection setup by adding a reference to
`EnvelopeGenerator.DependencyInjection` in the project file and
replacing multiple `using` directives with a single one.
Replaced obsolete `AddEnvelopeGeneratorInfrastructureServices`
and `AddEnvelopeGeneratorServices` methods with the new
`AddEnvelopeGenerator` method, consolidating service and
infrastructure setup.
Encapsulated `EGDbContext` configuration within
`AddEnvelopeGenerator` and removed obsolete `#pragma` directives.
Simplified mail service registration by replacing manual
`IEnvelopeMailService` setup with `AddEnvelopeMailService`.
These changes improve maintainability, reduce redundancy, and
modernize the codebase.
Updated project version to 1.0.1, including `<Version>`, `<AssemblyVersion>`, and `<FileVersion>`. Added `<PrivateAssets>all</PrivateAssets>` to `<ProjectReference>` elements to prevent exposing referenced projects' assets. Introduced `IncludeDependencyDlls` and `BundleReferencedDlls` targets to include and bundle dependent project DLLs for multiple target frameworks (`net7.0`, `net8.0`, `net9.0`). Removed redundant `<ProjectReference>` entries and improved packaging to ensure proper handling of dependencies.
Updated `EnvelopeGenerator.DependencyInjection.csproj` to support multiple target frameworks (`net7.0`, `net8.0`, `net9.0`) for broader compatibility. Added NuGet package metadata to enable publishing, including details like `PackageId`, `Authors`, and `RepositoryUrl`.
Upgraded `Microsoft.Extensions.Configuration.Abstractions` and `Microsoft.Extensions.DependencyInjection.Abstractions` to version `9.0.6`. Added a project reference to `EnvelopeGenerator.Domain`.
Modified `EnvelopeGenerator.sln` to adjust the build configuration for the project with GUID `{90FE0312-8C38-4347-9EA2-0A719E255D5C}`, setting `Debug` to use the `Release` configuration.
Updated `findNearest` for improved readability by renaming
parameters, introducing a helper function for distance
calculation, and using `Infinity` for clarity. Refactored
`getCurrentCulture` to use modern `typeof` syntax. Updated
`B64ToBuff` and `getLocaleDateString` for consistency with
naming conventions and concise syntax. Re-added
`detailedCurrentDate` to ensure consistency.
Added DocumentReceiverElementAnnotations (ElementAnnotation) and DocumentStatus DbSet properties to EGDbContextBase to support database operations for these entities.
Added import for EnvelopeGenerator.Domain.Interfaces. Updated logic to send final emails to receivers only if the envelope requires "Read and Sign," adding an extra check to the email dispatch condition.
Updated EnvelopeGenerator.Web.csproj to increment <Version>, <AssemblyVersion>, and <FileVersion> from 3.12.2 to 3.12.3, preparing for a new release. No other changes included.
Switched all audit and creation timestamps from UTC to local time
by replacing DateTime.UtcNow with DateTime.Now across the codebase.
This affects audit fields, object creation, and default values for
date/time properties.
Introduced a new Reject endpoint for users with the ReceiverFull role to reject annotations, with optional reason support. Marked the endpoint as obsolete for future exception handling updates. Also standardized the Unauthorized response to remove the custom error message.
Updated EnvelopeGenerator.Web.csproj to increment <Version>, <AssemblyVersion>, and <FileVersion> from 3.12.1 to 3.12.2, reflecting the new release. No other changes were made.
Clarified and streamlined the handling of rejected envelopes:
- Moved retrieval of rejecting receivers for clarity.
- Signed out users when any rejecting receivers are present.
- Improved determination of "external" users.
- Updated condition for showing the EnvelopeRejected view.
- Temporarily hardcoded ViewBag.IsExt with a TODO for future fix.
- Removed redundant code for better maintainability.
Updated <Version>, <AssemblyVersion>, and <FileVersion> in EnvelopeGenerator.Web.csproj from 3.12.0 to 3.12.1 to reflect a new patch release. No other changes were made.
Previously, rejection logic was applied to all envelopes. Now, the check for rejected receivers and the "EnvelopeRejected" view are only executed if the envelope is of the "ReadAndSign" type, preventing unnecessary rejection handling for other envelope types.
Added net7.0 to TargetFrameworks in EnvelopeGenerator.Web.csproj and introduced a conditional ItemGroup with required package references for .NET 7.0 compatibility. Also removed clipboard2.svg from the list of included static files.
Refactored the ReadOnly property in EnvelopeDto to use the IsReadAndConfirm() extension method instead of directly checking EnvelopeTypeId. Marked the property as [Obsolete] and advised using EnvelopeExtensions.IsReadAndConfirm.
Previously, rejection checks were performed for all envelopes. Now, the code checks for rejecting receivers only if the envelope is of the "read-and-sign" type, avoiding unnecessary queries and logic for other envelope types.
Introduced the IsReadAndSign method to IEnvelope extensions, which returns true when EnvelopeTypeId is not 2. This allows clear differentiation between "Read and Sign" and "Read and Confirm" envelope types.
Changed 'SignatureConfirmed' value in English to "Finalization confirmed" and in German to "Abschluss bestätigt". Updated designer file comments to match new wording.
Switched Model.Designer.cs comments from German to English and added new resource string properties for read confirmation workflows. Updated Model.resx and Model.en.resx with new and corrected entries, improved translation consistency, and clarified documentation.
Replaced German comments/descriptions with English for clarity and internationalization. Added new resource strings for confirmation/read confirmation statuses (e.g., CompletelyConfirmed, Confirmation, DocumentConfirmed, etc.) to support both signing and read confirmation workflows. Corrected and standardized several existing resource values for consistency across languages.
Move Y-axis flip transform inside signature drawing block and
wrap with SaveState/RestoreState to prevent side effects on
other drawing operations and pages. Removes redundant
page-level transformation for better encapsulation.
Previously, the code checked the status of the original document
after converting the merged PDF to PDF/A, which could miss
conversion errors. Now, it correctly checks the status of the
merged PDF to ensure the conversion succeeded.
Add private helper functions ReadEnvelope and LoadAnnotationDataForEnvelope to centralize retrieval of envelope byte data and annotation JSON from the database. Update PDF annotation burning logic to use these helpers, improving code reuse and testability.
Eliminated a redundant ProjectReference to EnvelopeGenerator.CommonServices.vbproj from the EnvelopeGenerator.BBTests.vbproj file, ensuring only a single reference remains. This helps prevent potential build issues and maintains project file clarity.
The StatusChangedWhen property, previously required and mapped
to the "STATUS_CHANGED_WHEN" column, has been removed from
the DocumentStatus entity in the EnvelopeGenerator.Domain.Entities
namespace. This change simplifies the entity and its mapping.