digipost / signature-api-client-dotnet

Apache License 2.0
3 stars 3 forks source link

Signer XML Creation Issue, Cant Create Singning Job using Signer Contact info in Direct Flow #425

Open mudassar017 opened 8 months ago

mudassar017 commented 8 months ago

(Press preview 👁‍🗨 to see how the issue will be after creating it and to easier read the template.)

Issue title

Signer XML Creation Issue, Cant Create Singning Job using Signer Contact info in Direct Flow

Unable to create a direct job with signer without using PersonalIdentificationNumber. Please help. I want to implement direct flow that a sender can also create job without PersonalIdentitficationNumber

Description

  1. I want to implement direct flow that a sender can also create job without PersonalIdentitficationNumber
  2. its working fine when i use only PersonalIdentificationNumber, here my code is

                    if (input.IsIdNumber)
                    {
                        var user = new Signer(new PersonalIdentificationNumber("1234567890"))
                        {
                            SignatureType = SignatureType.AdvancedSignature,
                        };
                        signers.Add(user); // Add the signer to the collection
                    }
                    else
                    {
                        var user = new Signer(new ContactInformation
                        {
                            Email = new Digipost.Signature.Api.Client.Core.Identifier.Email("test@email.com"),
                            Sms = new Sms("4512784562")
                        });
                        signers.Add(user); // Add the signer to the collection
                    }
  1. The error message "Digipost.Signature.Api.Client.Core.Exceptions.XmlParseException: 'Kunne ikke bygge Xml for signatur.'".
  2. I want to create job with both scenerios.
runeflobakk commented 7 months ago

Hello @mudassar017, and sorry for the late reply.

Are you working on an integration for a public sector organization?

The ability to address signers using email/sms is currently only available for private sector organizations. The reason for this is a bit complex, and revolves around the requirement for the public sector to use The common contact register (KRR) to lookup contact information for the receiver, and especially to adhere to the receiver's possible choice to opt-out from electronic communication (which includes electronic signing). We need the receiver's national identity number to be able to do a lookup for the receiver's contact data and if we are even allowed to proceed with collecting the receiver's signature.

You do have the ability to avoid the use of KRR lookup if you specify that the receiver is signing on behalf of "Other", which intended use is to say that the receiver does not sign on behalf theirself as a private citizen, but typically on behalf of an organization, so the requirements for adhering to any electronic communication opt-out does not apply. Though, there is still the requirement to specify the national identity number for all signers for public sector organizations.

That said, we are currently working on making the option to address signers without requiring national identity number available also to the public sector, and it is scheduled to be available no later than April, but is actually very likely to be done and available much earlier, maybe already by a couple of weeks from now

I will give you a notification on this issue when this is available for use in production, and I can also give a heads-up when it is available for testing in a test environment (probably Difiqa).

haralkvi commented 6 months ago

Dear @mudassar017,

As my colleague @runeflobakk wrote a while back, we have been working on making it an option to create a job without having to address signers using their national identity number (or PersonalIdentitficationNumber, as it is called in our code), instead using email address and/or phone number to identify signers. This option is now available in difiqa, one of our test environments for public sector organizations. It is, however, only available for organizations with the relevant settings enabled. The default setting remains disabled for now. In other words: if you wish to test creating a job without national identity number, please let us know for which organization you are developing an integration with Posten signering, and we'd be happy to enable the relevant settings for you.

Regards, Posten signering team

haralkvi commented 5 months ago

Hello again @mudassar017,

This is just to notify that creating signature jobs using custom provided contact info instead of personal identification number is now generally available in production to all public sector organizations. We ask that this feature be used cautiously and under the restrictions that are imposed on public sector organizations with regard to digital communication with citizens. Please see our updated documentation on addressing signers for more information.