mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-13 07:11:56 +01:00
33 lines
907 B
C#
33 lines
907 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Capnp;
|
|
using Capnp.Rpc;
|
|
using FabAccessAPI.Schema;
|
|
|
|
namespace FabAccessAPI
|
|
{
|
|
class Connection {
|
|
private TcpRpcClient _rpcClient;
|
|
private IBootstrap _bootstrapCap;
|
|
private User _user;
|
|
private Auth _auth;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="rpcClient">Should be an already configured and connected TcpRpcClient</param>
|
|
public Connection(TcpRpcClient rpcClient) {
|
|
_rpcClient = rpcClient;
|
|
_bootstrapCap = _rpcClient.GetMain<IBootstrap>();
|
|
}
|
|
|
|
async Task Auth(string mech, Dictionary<string, string> kvs) {
|
|
_auth = new Auth(await _bootstrapCap.Auth());
|
|
var mechs = await _auth.GetMechanisms().ConfigureAwait(false);
|
|
}
|
|
}
|
|
}
|