This commit is contained in:
Suwath Ch 2015-09-17 17:48:24 -07:00
Родитель a0f1168149
Коммит 1cc60c6999
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -300,7 +300,8 @@ namespace ARMClient.Authentication.AADAuthentication
result = context.AcquireToken( result = context.AcquireToken(
resource: resource, resource: resource,
clientId: Constants.AADClientId, clientId: Constants.AADClientId,
redirectUri: new Uri(Constants.AADRedirectUri)); redirectUri: new Uri(Constants.AADRedirectUri),
promptBehavior: PromptBehavior.Never);
} }
else else
{ {
@ -308,7 +309,7 @@ namespace ARMClient.Authentication.AADAuthentication
resource: resource, resource: resource,
clientId: Constants.AADClientId, clientId: Constants.AADClientId,
redirectUri: new Uri(Constants.AADRedirectUri), redirectUri: new Uri(Constants.AADRedirectUri),
promptBehavior: PromptBehavior.Always); promptBehavior: PromptBehavior.Auto);
} }
var cacheInfo = new TokenCacheInfo(resource, result); var cacheInfo = new TokenCacheInfo(resource, result);
@ -498,7 +499,7 @@ namespace ARMClient.Authentication.AADAuthentication
displayName = subscription.displayName displayName = subscription.displayName
}).ToArray(); }).ToArray();
if (info.subscriptions.Length > 0) if (recentInfo != null && info.subscriptions.Length > 0)
{ {
recentInfo = result; recentInfo = result;
} }