226 |
226 |
|
227 |
227 |
var groups = new List<Group>();
|
228 |
228 |
|
229 |
|
using (var authClient = new HttpClient(_httpClientHandler,false){ BaseAddress = new Uri(AuthenticationUrl),Timeout=TimeSpan.FromSeconds(30) })
|
|
229 |
// using (var authClient = new HttpClient(_httpClientHandler,false){ BaseAddress = new Uri(AuthenticationUrl),Timeout=TimeSpan.FromSeconds(30) })
|
|
230 |
using (var authClient = new HttpClient(_httpClientHandler, false) { BaseAddress = new Uri(AuthenticationUrl), Timeout = TimeSpan.FromSeconds(30) })
|
230 |
231 |
{
|
231 |
232 |
|
232 |
233 |
authClient.DefaultRequestHeaders.Add("X-Auth-User", UserName);
|
... | ... | |
235 |
236 |
string storageUrl;
|
236 |
237 |
string token;
|
237 |
238 |
|
238 |
|
using (var response = await authClient.GetAsyncWithRetries(new Uri(VersionPath, UriKind.Relative),3).ConfigureAwait(false)) // .DownloadStringWithRetryRelative(new Uri(VersionPath, UriKind.Relative), 3);
|
|
239 |
//using (var response = await authClient.GetAsyncWithRetries(new Uri(VersionPath, UriKind.Relative),3).ConfigureAwait(false)) // .DownloadStringWithRetryRelative(new Uri(VersionPath, UriKind.Relative), 3);
|
|
240 |
using (var response = await authClient.GetAsyncWithRetries(new Uri("", UriKind.Relative), 3).ConfigureAwait(false)) // .DownloadStringWithRetryRelative(new Uri(VersionPath, UriKind.Relative), 3);
|
239 |
241 |
{
|
240 |
242 |
AssertStatusOK(response,"Authentication failed");
|
241 |
243 |
|
... | ... | |
296 |
298 |
{
|
297 |
299 |
displayName = await ResolveName(uuid);
|
298 |
300 |
}
|
299 |
|
return new AccountInfo {StorageUri = StorageUrl, Token = Token, UserName = UserName,DisplayName=displayName,Groups=groups};
|
|
301 |
return new AccountInfo {StorageUri = StorageUrl, Token = Token, UserName = UserName, DisplayName=displayName, Groups=groups};
|
300 |
302 |
|
301 |
303 |
}
|
302 |
304 |
|