Skip to content

Commit

Permalink
Merge pull request #14 from criipto/mutation-SignActingAs
Browse files Browse the repository at this point in the history
add mutation SignActingAs
  • Loading branch information
sgryt authored Mar 22, 2023
2 parents 94d0dc4 + b41dc16 commit e3b8449
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 0 deletions.
82 changes: 82 additions & 0 deletions Criipto.Signatures.IntegrationTests/SignActingAsTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using Xunit;
using Criipto.Signatures;
using Criipto.Signatures.Models;
using System.Collections.Generic;
using System.Linq;
namespace Criipto.Signatures.IntegrationTests;

public class SignActingAsTests
{

[Fact]
public async void MutationSigns()
{
using (var client = new CriiptoSignaturesClient(Dsl.CLIENT_ID, Dsl.CLIENT_SECRET, "test"))
{
// Arrange
var signatureOrder = await client.CreateSignatureOrder(
new CreateSignatureOrderInput()
{
title = "Title",
expiresInDays = 1,
documents = new List<DocumentInput>(){
new DocumentInput {
pdf =
new PadesDocumentInput
{
title = "TEST",
blob = Dsl.Sample
}
}
},
disableVerifyEvidenceProvider = true,
evidenceProviders = new List<EvidenceProviderInput>() {
new EvidenceProviderInput() {
enabledByDefault = true,
drawable = new DrawableEvidenceProviderInput() {
requireName = true
}
}
}
}
);

var signatory = await client.AddSignatory(
signatureOrder,
new AddSignatoryInput()
{
documents = signatureOrder.documents.Select(d => new SignatoryDocumentInput()
{
id = d.id,
preapproved = true
}).ToList()
}
);

var drawable =
signatureOrder!.evidenceProviders
.Where(e => e is DrawableSignatureEvidenceProvider)
.First();

// Act
var actual = await client.SignActingAs(
signatory,
new SignActingAsInput()
{
evidence = new SignInput()
{
id = drawable.id,
drawable = new SignDrawableInput()
{
name = "Example Name",
image = System.Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAk4AAAB/CAYAAAAZ4E3UAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAC3zSURBVHhe7Z13vBTV+f9JMSbB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k5CFAMnnDzUH7I6CSHyCaUGunfvbraJOZXjEUQUOrXaPRRVpnq8hJMQ+acknMhFQo0Zq5MQIp/gw7PVVn8328Rsl2V4/fXWjVWuhkKnEk5C5J8u7N8vvNBC7onJ6iCEyC8s9tbronoknIQoBl14orr44gvMRiGEEPGQcBKiGHSxXhRCCFEdEk5CFAMJJyGESAAJJyGKgYSTEEIkgISTEMVAwkkIIYQQIiYSTkIIIYQQMZFwEkIIIYSIiYSTEEIIIURMJJyEEEIIIWIxO/j/3b/wCbGzhY8AAAAASUVORK5CYII=")
}
}
}
);

// Assert
Assert.Equal(SignatoryStatus.SIGNED, actual.status);
}
}
}
28 changes: 28 additions & 0 deletions Criipto.Signatures/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,34 @@ public async Task<SignatureOrder> CleanupSignatureOrder(string signatureOrderId)
return await CleanupSignatureOrder(input).ConfigureAwait(false);
}

public async Task<Signatory> SignActingAs(SignActingAsInput input)
{
var data = await SendMutation(
SignActingAsMutation.Request(new { input = input }),
() => new { SignActingAs = new SignActingAsOutput() }
).ConfigureAwait(false);

return data.SignActingAs.signatory;
}

public async Task<Signatory> SignActingAs(Signatory signatory, SignActingAsInput input)
{
if (signatory == null) throw new ArgumentNullException(nameof(signatory));
if (input == null) throw new ArgumentNullException(nameof(input));

input.signatoryId = signatory.id;
return await SignActingAs(input).ConfigureAwait(false);
}

public async Task<Signatory> SignActingAs(string signatoryId, SignActingAsInput input)
{
if (signatoryId == null) throw new ArgumentNullException(nameof(signatoryId));
if (input == null) throw new ArgumentNullException(nameof(input));

input.signatoryId = signatoryId;
return await SignActingAs(input).ConfigureAwait(false);
}

public async Task<SignatureOrder?> QuerySignatureOrder(string signatureOrderId, bool includeDocuments = false)
{
if (signatureOrderId == null) throw new ArgumentNullException(nameof(signatureOrderId));
Expand Down
Loading

0 comments on commit e3b8449

Please sign in to comment.