private OneSpanSign.Sdk.IdvWorkflow CreateTypicalSDKIdvWorkflow()
 {
     return(IdvWorkflowBuilder.NewIdvWorkflow("id")
            .WithType("sdkType")
            .WithTenant("sdkTenant")
            .WithDesc("sdkDesc")
            .Build());
 }
        public void SetsUpIDVAuthentication()
        {
            Signer signer = SignerBuilder.NewSignerWithEmail("*****@*****.**")
                            .WithFirstName("Billy")
                            .WithLastName("Bob")
                            .WithIDVAuthentication(IdvWorkflowBuilder.NewIdvWorkflow("00000000-0000-0001-0000-200000000055")
                                                   .WithType("DVF")
                                                   .WithTenant("oss")
                                                   .Build())
                            .Build();

            Assert.AreEqual(AuthenticationMethod.IDV, signer.AuthenticationMethod);
        }
Exemple #3
0
        internal IdvWorkflow ToSDKIdvWorkflow()
        {
            if (apiIdvWorkflow == null)
            {
                return(sdkIdvWorkflow);
            }

            return(IdvWorkflowBuilder
                   .NewIdvWorkflow(apiIdvWorkflow.Id)
                   .WithType(apiIdvWorkflow.Type)
                   .WithTenant(apiIdvWorkflow.Tenant)
                   .WithDesc(apiIdvWorkflow.Desc)
                   .Build());
        }
        public void BuildTest()
        {
            string id     = "id";
            string type   = "type";
            string tenant = "tenant";
            string desc   = "desc";

            IdvWorkflow idvWorkflow = IdvWorkflowBuilder.NewIdvWorkflow(id)
                                      .WithType(type)
                                      .WithTenant(tenant)
                                      .WithDesc(desc)
                                      .Build();

            Assert.AreEqual(id, idvWorkflow.Id);
            Assert.AreEqual(type, idvWorkflow.Type);
            Assert.AreEqual(tenant, idvWorkflow.Tenant);
            Assert.AreEqual(desc, idvWorkflow.Desc);
        }
        override public void Execute()
        {
            AccountConfigService accountConfigService = ossClient.AccountConfigService;

            idvWorkflowConfigsBeforeCreating = accountConfigService.GetIdvWorkflowConfigs();

            if (idvWorkflowConfigsBeforeCreating.Count != 0)
            {
                accountConfigService.DeleteIdvWorkflowConfigs();
                idvWorkflowConfigsBeforeCreating = accountConfigService.GetIdvWorkflowConfigs();
            }

            idvWorkflowConfigsAfterCreating = accountConfigService
                                              .CreateIdvWorkflowConfigs(idvWorkflowConfigsToBeCreated);

            idvWorkflowConfigsAfterUpdating = accountConfigService
                                              .UpdateIdvWorkflowConfigs(idvWorkflowConfigsToBeUpdated);

            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed(PackageName)
                                                .DescribedAs("This is a Signer IDV authentication example")
                                                .WithSigner(SignerBuilder.NewSignerWithEmail(email1)
                                                            .WithFirstName("Jamie Anne")
                                                            .WithLastName("Kurtz")
                                                            .WithIDVAuthentication(PHONE_NUMBER,
                                                                                   IdvWorkflowBuilder.NewIdvWorkflow(IDV_WORKFLOW_ID1)
                                                                                   .WithType(TYPE1)
                                                                                   .WithTenant(TENANT)
                                                                                   .Build()))
                                                .WithDocument(DocumentBuilder.NewDocumentNamed(DOCUMENT_NAME)
                                                              .FromStream(fileStream1, DocumentType.PDF)
                                                              .WithSignature(SignatureBuilder.SignatureFor(email1)
                                                                             .OnPage(0)
                                                                             .AtPosition(100, 100)))
                                                .Build();

            packageId = ossClient.CreatePackage(superDuperPackage);
            ossClient.SendPackage(packageId);
            retrievedPackage = ossClient.GetPackage(packageId);

            accountConfigService.DeleteIdvWorkflowConfigs();
            idvWorkflowConfigsAfterDeleting = accountConfigService.GetIdvWorkflowConfigs();
        }