diff options
| author | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
| commit | cdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch) | |
| tree | a8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Views/Manage/ManageLogins.cshtml | |
| parent | d9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff) | |
| download | project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2 project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip | |
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Views/Manage/ManageLogins.cshtml')
| -rw-r--r-- | Project-Unite/Views/Manage/ManageLogins.cshtml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Project-Unite/Views/Manage/ManageLogins.cshtml b/Project-Unite/Views/Manage/ManageLogins.cshtml new file mode 100644 index 0000000..709cedc --- /dev/null +++ b/Project-Unite/Views/Manage/ManageLogins.cshtml @@ -0,0 +1,70 @@ +@model Project_Unite.Models.ManageLoginsViewModel +@using Microsoft.Owin.Security +@{ + ViewBag.Title = "Manage your external logins"; +} + +<h2>@ViewBag.Title.</h2> + +<p class="text-success">@ViewBag.StatusMessage</p> +@{ + var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); + if (loginProviders.Count() == 0) { + <div> + <p> + There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=313242">this article</a> + for details on setting up this ASP.NET application to support logging in via external services. + </p> + </div> + } + else + { + if (Model.CurrentLogins.Count > 0) + { + <h4>Registered Logins</h4> + <table class="table"> + <tbody> + @foreach (var account in Model.CurrentLogins) + { + <tr> + <td>@account.LoginProvider</td> + <td> + @if (ViewBag.ShowRemoveButton) + { + using (Html.BeginForm("RemoveLogin", "Manage")) + { + @Html.AntiForgeryToken() + <div> + @Html.Hidden("loginProvider", account.LoginProvider) + @Html.Hidden("providerKey", account.ProviderKey) + <input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" /> + </div> + } + } + else + { + @: + } + </td> + </tr> + } + </tbody> + </table> + } + if (Model.OtherLogins.Count > 0) + { + using (Html.BeginForm("LinkLogin", "Manage")) + { + @Html.AntiForgeryToken() + <div id="socialLoginList"> + <p> + @foreach (AuthenticationDescription p in Model.OtherLogins) + { + <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> + } + </p> + </div> + } + } + } +} |
