React to Caption => DisplayName rename

This commit is contained in:
Hao Kung 2015-09-23 15:04:12 -07:00
parent 5c0700791a
commit 3ef5caf1ab
3 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@
<div id="socialLoginList"> <div id="socialLoginList">
<p> <p>
@foreach (AuthenticationDescription p in ViewBag.LoginProviders) { @foreach (AuthenticationDescription p in ViewBag.LoginProviders) {
<button type="submit" class="btn btn-default" id="@p.AuthenticationScheme" name="provider" value="@p.AuthenticationScheme" title="Log in using your @p.Caption account">@p.AuthenticationScheme</button> <button type="submit" class="btn btn-default" id="@p.AuthenticationScheme" name="provider" value="@p.AuthenticationScheme" title="Log in using your @p.DisplayName account">@p.AuthenticationScheme</button>
} }
</p> </p>
</div> </div>

View File

@ -52,7 +52,7 @@
<p> <p>
@foreach (AuthenticationDescription p in Model.OtherLogins) @foreach (AuthenticationDescription p in Model.OtherLogins)
{ {
<button type="submit" class="btn btn-default" id="@p.AuthenticationScheme" name="provider" value="@p.AuthenticationScheme" title="Log in using your @p.Caption account">@p.AuthenticationScheme</button> <button type="submit" class="btn btn-default" id="@p.AuthenticationScheme" name="provider" value="@p.AuthenticationScheme" title="Log in using your @p.DisplayName account">@p.AuthenticationScheme</button>
} }
</p> </p>
</div> </div>

View File

@ -386,7 +386,7 @@ namespace Microsoft.AspNet.Identity
/// <returns>A collection of <see cref="AuthenticationDescription"/>s for the known external login providers.</returns> /// <returns>A collection of <see cref="AuthenticationDescription"/>s for the known external login providers.</returns>
public virtual IEnumerable<AuthenticationDescription> GetExternalAuthenticationSchemes() public virtual IEnumerable<AuthenticationDescription> GetExternalAuthenticationSchemes()
{ {
return Context.Authentication.GetAuthenticationSchemes().Where(d => !string.IsNullOrEmpty(d.Caption)); return Context.Authentication.GetAuthenticationSchemes().Where(d => !string.IsNullOrEmpty(d.DisplayName));
} }
/// <summary> /// <summary>
@ -424,7 +424,7 @@ namespace Microsoft.AspNet.Identity
return null; return null;
} }
// REVIEW: fix this wrap // REVIEW: fix this wrap
return new ExternalLoginInfo(auth.Principal, provider, providerKey, new AuthenticationDescription(auth.Description).Caption); return new ExternalLoginInfo(auth.Principal, provider, providerKey, new AuthenticationDescription(auth.Description).DisplayName);
} }
/// <summary> /// <summary>