public ClientAuthenticationController( IClientAuthentication clientAuthentication, IOptions <AppSettings> appSettings) { _clientAuthentication = clientAuthentication; _appSettings = appSettings.Value; }
public Task <TokenResponse> PerformTokenRequestAsync(TokenRequest request, IClientAuthentication clientAuthentication) { var tcs = new TaskCompletionSource <TokenResponse>(); PerformTokenRequest(request, clientAuthentication, (resp, ex) => { if (ex != null) { tcs.SetException(ex); } else { tcs.SetResult(resp); } }); return(tcs.Task); }
/// <summary> /// Creates a means of connecting to a <see cref="CtpServer"/>. /// </summary> /// <param name="host">The host IP</param> /// <param name="authentication">The authentication ticket to use. Specify null to not use SSL.</param> public CtpClient(IPEndPoint host, IClientAuthentication authentication = null) { m_remoteEndpoint = host; m_authentication = authentication ?? new ClientAuthenticationNone(); }
public void PerformTokenRequest(TokenRequest request, IClientAuthentication clientAuthentication, Action <TokenResponse, AuthorizationException> callback) { PerformTokenRequest(request, clientAuthentication, new TokenResponseCallback(callback)); }
private void Act() { _actual = _serviceFactory.CreateClientAuthentication(); }
public void Configure(string hostKey, IClientAuthentication clientAuthentication = null) { hostConfig = configurator.GetHost(hostKey); authorizer = clientAuthentication; }