/// <summary> /// Creates authenticated client backed by the specified channel. The supplied /// signer is used to authenticate the caller for every call. /// </summary> /// <param name="channel">the RPC channel to use</param> /// <param name="memberId">the member id</param> /// <param name="crypto">the engine to use for signing requests, tokens, etc</param> /// <returns>the created client</returns> public static Client Authenticated( ManagedChannel channel, string memberId, ICryptoEngine crypto) { return(new Client(memberId, crypto, channel)); }
/// <summary> /// Instantiates a client. /// </summary> /// <param name="memberId">the member id</param> /// <param name="cryptoEngine">the crypto engine used to sign for authentication, request /// payloads, etc</param> /// <param name="channel">managed channel</param> public Client(string memberId, ICryptoEngine cryptoEngine, ManagedChannel channel) { this.MemberId = memberId; this.cryptoEngine = cryptoEngine; this.channel = channel; }
/// <summary> /// Creates new unauthenticated client backed by the specified channel. /// </summary> /// <returns>The unauthenticated.</returns> /// <param name="channel">Channel.</param> public static UnauthenticatedClient Unauthenticated(ManagedChannel channel) { return(new UnauthenticatedClient(new GatewayService.GatewayServiceClient(channel.BuildInvoker()))); }