initial commit
[CPE_learningsite] / CPE / CPE.App / CPE.App.Web / Views / Account / _ExternalLoginsListPartial.cshtml
1 @model CPE.App.Web.Models.ExternalLoginListViewModel
2 @using Microsoft.Owin.Security
3
4 <h4>Use another service to log in.</h4>
5 <hr />
6 @{
7     var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
8     if (loginProviders.Count() == 0) {
9         <div>
10             <p>
11                 There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
12                 for details on setting up this ASP.NET application to support logging in via external services.
13             </p>
14         </div>
15     }
16     else {
17         using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) {
18             @Html.AntiForgeryToken()
19             <div id="socialLoginList">
20                 <p>
21                     @foreach (AuthenticationDescription p in loginProviders) {
22                         <button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
23                     }
24                 </p>
25             </div>
26         }
27     }
28 }