hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
84 stars 74 forks source link

Connection Acknowledgement #99

Open briscula opened 4 years ago

briscula commented 4 years ago

According to Aries RFC https://github.com/hyperledger/aries-rfcs/tree/master/features/0160-connection-protocol#3-connection-acknowledgement after a connection response is received, the invitee SHOULD send a message to the inviter.

This is a possible patch that could be implemented in DefaultConnectionHandler

case MessageTypes.ConnectionResponse:
{
    var response = messageContext.GetMessage<ConnectionResponseMessage>();
    await _connectionService.ProcessResponseAsync(agentContext, response, messageContext.Connection);
    messageContext.ContextRecord = messageContext.Connection;

    // Send Acknowledgement
    var connection = await _connectionService.GetAsync(agentContext, messageContext.Connection.Id);
    var ack = new TrustPingMessage
    {
        ResponseRequested = false
    };
    await _messageService.SendAsync(agentContext.Wallet, ack, connection);

    return null;
}
anilhelvaci commented 3 years ago

Yes I get the same issue when working with xamarin mobile agent as my invitee. Mobile agent is in the state "connected" but the inviter agent is stuck in the state "response". Are there any other solutions for this or the above patch is a must?