Egov.Integrations.MSign.Soap
8.0.19
Prefix Reserved
See the version list below for details.
dotnet add package Egov.Integrations.MSign.Soap --version 8.0.19
NuGet\Install-Package Egov.Integrations.MSign.Soap -Version 8.0.19
<PackageReference Include="Egov.Integrations.MSign.Soap" Version="8.0.19" />
<PackageVersion Include="Egov.Integrations.MSign.Soap" Version="8.0.19" />
<PackageReference Include="Egov.Integrations.MSign.Soap" />
paket add Egov.Integrations.MSign.Soap --version 8.0.19
#r "nuget: Egov.Integrations.MSign.Soap, 8.0.19"
#:package Egov.Integrations.MSign.Soap@8.0.19
#addin nuget:?package=Egov.Integrations.MSign.Soap&version=8.0.19
#tool nuget:?package=Egov.Integrations.MSign.Soap&version=8.0.19
MSign SOAP Digital Signature
This package is intended for Service Provider integration built on ASP.NET Core 8.0+ with MSign using SOAP protocol for digital signature operations.
Getting Started
Please go through the following instructions to integrate your project with MSign.
Prerequisites
Before being able to integrate with MSign, a Service Provider, including its certificate, must be registered accordingly in MSign. MSign accepts certificates issued by STISC.
Installing
Install the following package from NuGet
Install-Package Egov.Integrations.MSign.Soap
Then follow the instructions from Configuration and Usage sections below.
Configuration
Add the following configuration section to your appsettings.json:
{
...
"Certificate": {
"Path": "Files\\Certificates\\msign-sample.pfx",
"Password": "yourpfxpassword"
},
"MSignSoap": {
"ApiAddress": "https://msign.staging.egov.md:8443/MSign.svc",
"FrontendAddress": "https://msign.staging.egov.md",
"ServiceRootUrl": "https://localhost:44379"
}
...
}
where ServiceRootUrl is the base path of your published service.
Please note that your Service must be published using https protocol.
Usage
Add the following code snippet to your Startup.ConfigureServices method:
services.AddMSignSoapClient(builder.Configuration.GetSection("MSignSoap"));
In your controller, inject IMSignSoapClient and use it to create signature requests:
public class HomeController : ControllerBase
{
private readonly IMSignSoapClient _msignClient;
public HomeController(IMSignSoapClient msignClient)
{
_msignClient = msignClient;
}
public async Task<IActionResult> IndexAsync()
{
var requestID = await _msignClient.PostSignRequestAsync(new SignRequest
{
ShortContentDescription = "Sample HASH signature",
ContentType = ContentType.Hash,
Contents = new[]
{
new SignContent
{
Content = SHA1.HashData(new byte[] { 0xDE, 0xAD, 0xBE, 0xEF })
}
}
});
// example Relay State
var relayState = Guid.NewGuid().ToString();
return Redirect(_msignClient.BuildRedirectAddress(requestID, Url.Action(nameof(MSignResponse))!, relayState));
}
public async Task<IActionResult> MSignResponse(string requestID, string relayState)
{
var response = await _msignClient.GetSignResponseAsync(requestID, null);
if (response.Status == SignStatus.Success)
{
// Process successful signature
return Ok();
}
// Handle signature failure
return BadRequest(response.Message);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Age.Extensions.Configuration (>= 8.0.1)
- Microsoft.Extensions.ObjectPool (>= 8.0.22)
- System.Security.Cryptography.Xml (>= 8.0.2)
- System.ServiceModel.Http (>= 8.1.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Egov.Integrations.MSign.Soap:
| Package | Downloads |
|---|---|
|
Egov.Fod.BackComponents
Standard backend components for FOD integrations including MDocs, MNotify, MSign, and MPower. |
GitHub repositories
This package is not used by any popular GitHub repositories.