| 1234567891011121314151617181920212223242526272829 |
- @model Winsoft.GOV.XF.WX.Models.ExternalLoginListViewModel
- @using Microsoft.Owin.Security
- <h4>使用其他服务登录。</h4>
- <hr />
- @{
- var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
- if (loginProviders.Count() == 0) {
- <div>
- <p>
- There are no external authentication services configured. See <a href="https://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
- for details on setting up this ASP.NET application to support logging in via external services.
- </p>
- </div>
- }
- else {
- using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {
- @Html.AntiForgeryToken()
- <div id="socialLoginList">
- <p>
- @foreach (AuthenticationDescription p in loginProviders) {
- <button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="使用你的 @p.Caption 帐户登录">@p.AuthenticationType</button>
- }
- </p>
- </div>
- }
- }
- }
|