public WmsAuthService(string baseUrl, IHttpClientStore httpClientStore) { Contract.Requires(baseUrl != null); Contract.Requires(httpClientStore != null); _baseUrl = baseUrl; _httpClientStore = httpClientStore; }
public ExtDirectProvider(string baseUrl, string path, IHttpClientStore httpClientStore) { Contract.Requires(!string.IsNullOrEmpty(baseUrl)); Contract.Requires(httpClientStore != null); _rpcPath = (baseUrl.Last() == '/' ? baseUrl : baseUrl + "/") + path; _httpClient = httpClientStore.GetOrCreate(baseUrl); _metadata = GetMetadata(_rpcPath); }
public static void Authenticate(string baseUrl, IHttpClientStore clientStore, string login = TestSettings.DefaultOkLogin, string pass = TestSettings.DefaultOkPass) { var authSvc = new WmsAuthService(baseUrl, clientStore); string userCode; var res = authSvc.Authenticate(login, pass, out userCode); if (!res) { throw new AuthenticationException(); } }