Removing some more view pages related to the external login. Also fixed the corresponding views
that were trying to render them.
This commit is contained in:
parent
d4c0e7dd90
commit
843c952928
|
|
@ -1,39 +0,0 @@
|
||||||
@model MusicStore.Models.ExternalLoginConfirmationViewModel
|
|
||||||
@{
|
|
||||||
ViewBag.Title = "Register";
|
|
||||||
}
|
|
||||||
<h2>@ViewBag.Title.</h2>
|
|
||||||
<h3>Associate your @ViewBag.LoginProvider account.</h3>
|
|
||||||
|
|
||||||
@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
|
||||||
{
|
|
||||||
@Html.AntiForgeryToken()
|
|
||||||
|
|
||||||
<h4>Association Form</h4>
|
|
||||||
<hr />
|
|
||||||
@Html.ValidationSummary(true)
|
|
||||||
<p class="text-info">
|
|
||||||
You've successfully authenticated with <strong>@ViewBag.LoginProvider</strong>.
|
|
||||||
Please enter a user name for this site below and click the Register button to finish
|
|
||||||
logging in.
|
|
||||||
</p>
|
|
||||||
<div class="form-group">
|
|
||||||
@Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
|
|
||||||
<div class="col-md-10">
|
|
||||||
@Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
|
|
||||||
@Html.ValidationMessageFor(m => m.UserName)
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-offset-2 col-md-10">
|
|
||||||
<input type="submit" class="btn btn-default" value="Register" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
@section Scripts {
|
|
||||||
@*Bug : Script helpers are out of scope for alpha*@
|
|
||||||
@*@Scripts.Render("~/bundles/jqueryval")*@
|
|
||||||
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
|
|
||||||
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")"></script>
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
@{
|
|
||||||
//Bug: Need a way to specify the layout page in a single place
|
|
||||||
Layout = "/Views/Shared/_Layout.cshtml";
|
|
||||||
ViewBag.Title = "Login Failure";
|
|
||||||
}
|
|
||||||
|
|
||||||
<h2>@ViewBag.Title.</h2>
|
|
||||||
<h3 class="text-error">Unsuccessful login with service.</h3>
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
@using MusicStore.Models;
|
@{
|
||||||
@using Microsoft.AspNet.Identity;
|
|
||||||
@{
|
|
||||||
//Bug: Need a way to specify the layout page in a single place
|
//Bug: Need a way to specify the layout page in a single place
|
||||||
Layout = "/Views/Shared/_Layout.cshtml";
|
Layout = "/Views/Shared/_Layout.cshtml";
|
||||||
ViewBag.Title = "Manage Account";
|
ViewBag.Title = "Manage Account";
|
||||||
|
|
@ -11,14 +9,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@if (ViewBag.HasLocalPassword)
|
@await Html.PartialAsync("_ChangePasswordPartial")
|
||||||
{
|
|
||||||
await Html.PartialAsync("_ChangePasswordPartial");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
await Html.PartialAsync("_SetPasswordPartial");
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
@*@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })*@
|
@*@Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })*@
|
||||||
<label class="col-md-2 control-label">Confirm Password</label>
|
<label class="col-md-2 control-label">Confirm Password</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@*@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })*@
|
@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
@using Microsoft.AspNet.Identity
|
@*This using statement to MusicStore.Controllers should go away once we have the GetUserName() extension on IIdentity in some Identity package*@
|
||||||
|
@using MusicStore.Controllers
|
||||||
@model MusicStore.Models.ManageUserViewModel
|
@model MusicStore.Models.ManageUserViewModel
|
||||||
|
|
||||||
<p>You're logged in as <strong>@Context.HttpContext.User.Identity.Name</strong>.</p>
|
<p>You're logged in as <strong>@Context.HttpContext.User.Identity.GetUserName()</strong>.</p>
|
||||||
|
|
||||||
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
@using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
|
||||||
{
|
{
|
||||||
@*@Html.AntiForgeryToken()*@
|
@*@Html.AntiForgeryToken()*@
|
||||||
<h4>Change Password Form</h4>
|
<h4>Change Password Form</h4>
|
||||||
<hr />
|
<hr />
|
||||||
@Html.ValidationSummary()
|
@*@Html.ValidationSummary()*@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@*@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })*@
|
@*@Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })*@
|
||||||
<label class="col-md-2 control-label">Old Password</label>
|
<label class="col-md-2 control-label">Old Password</label>
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
@using Microsoft.AspNet.Identity;
|
|
||||||
|
|
||||||
<h4>Use another service to log in.</h4>
|
|
||||||
<hr />
|
|
||||||
@{
|
|
||||||
var loginProviders = Context.HttpContext.GetAuthenticationTypes();
|
|
||||||
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
|
|
||||||
{
|
|
||||||
string action = Model.Action;
|
|
||||||
string returnUrl = Model.ReturnUrl;
|
|
||||||
using (Html.BeginForm(action, "Account", new { ReturnUrl = 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="Log in using your @p.Caption account">@p.AuthenticationType</button>
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
@model ICollection<microsoft.aspnet.identity.userlogininfo>
|
|
||||||
|
|
||||||
@if (Model.Count > 0)
|
|
||||||
{
|
|
||||||
<h4>Registered Logins</h4>
|
|
||||||
<table class="table">
|
|
||||||
<tbody>
|
|
||||||
@foreach (var account in Model)
|
|
||||||
{
|
|
||||||
<tr>
|
|
||||||
<td>@account.LoginProvider</td>
|
|
||||||
<td>
|
|
||||||
@if (ViewBag.ShowRemoveButton)
|
|
||||||
{
|
|
||||||
using (Html.BeginForm("Disassociate", "Account"))
|
|
||||||
{
|
|
||||||
@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>
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue