├── .deployment ├── samples └── MusicStore │ ├── ForTesting │ ├── Readme.md │ ├── MusicStoreConfig.cs │ └── Mocks │ │ ├── Common │ │ ├── Helpers.cs │ │ └── CustomStateDataFormat.cs │ │ ├── OpenIdConnect │ │ ├── CustomStringDataFormat.cs │ │ ├── openid-configuration.json │ │ ├── OpenIdConnectBackChannelHttpHandler.cs │ │ ├── keys.json │ │ └── TestOpenIdConnectEvents.cs │ │ ├── Twitter │ │ ├── CustomTwitterStateDataFormat.cs │ │ ├── TestTwitterEvents.cs │ │ └── TwitterMockBackChannelHttpHandler.cs │ │ ├── Facebook │ │ ├── TestFacebookEvents.cs │ │ └── FacebookMockBackChannelHttpHandler.cs │ │ ├── Google │ │ ├── TestGoogleEvents.cs │ │ └── GoogleMockBackChannelHttpHandler.cs │ │ └── MicrosoftAccount │ │ ├── MicrosoftAccountMockBackChannelHandler.cs │ │ └── TestMicrosoftAccountEvents.cs │ ├── Views │ ├── _ViewStart.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── AccessDenied.cshtml │ │ ├── StatusCodePage.cshtml │ │ ├── Lockout.cshtml │ │ ├── Components │ │ │ ├── Announcement │ │ │ │ └── Default.cshtml │ │ │ ├── CartSummary │ │ │ │ └── Default.cshtml │ │ │ └── GenreMenu │ │ │ │ └── Default.cshtml │ │ ├── DemoLinkDisplay.cshtml │ │ ├── _ValidationScriptsPartial.cshtml │ │ ├── _LoginPartial.cshtml │ │ └── _Layout.cshtml │ ├── _ViewImports.cshtml │ ├── Account │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ConfirmEmail.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── RegisterConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── Register.cshtml │ │ ├── VerifyCode.cshtml │ │ ├── ResetPassword.cshtml │ │ └── Login.cshtml │ ├── Checkout │ │ ├── Complete.cshtml │ │ └── AddressAndPayment.cshtml │ ├── Store │ │ ├── Index.cshtml │ │ ├── Details.cshtml │ │ └── Browse.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── VerifyPhoneNumber.cshtml │ │ ├── SetPassword.cshtml │ │ ├── ChangePassword.cshtml │ │ ├── ManageLogins.cshtml │ │ └── Index.cshtml │ └── ShoppingCart │ │ └── Index.cshtml │ ├── Areas │ └── Admin │ │ └── Views │ │ ├── _ViewStart.cshtml │ │ └── StoreManager │ │ ├── RemoveAlbum.cshtml │ │ ├── Details.cshtml │ │ ├── Index.cshtml │ │ ├── Create.cshtml │ │ └── Edit.cshtml │ ├── wwwroot │ ├── favicon.ico │ ├── Images │ │ ├── logo.png │ │ ├── placeholder.png │ │ └── home-showcase.png │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── Content │ │ └── Site.css │ └── Scripts │ │ ├── respond.min.js │ │ └── jquery.validate.unobtrusive.min.js │ ├── ViewModels │ ├── AlbumData.cs │ ├── ShoppingCartViewModel.cs │ └── ShoppingCartRemoveViewModel.cs │ ├── Properties │ ├── AppSettings.cs │ └── launchSettings.json │ ├── Models │ ├── Artist.cs │ ├── Genre.cs │ ├── OrderDetail.cs │ ├── CartItem.cs │ ├── MusicStoreContext.cs │ ├── Album.cs │ ├── Order.cs │ ├── ManageViewModels.cs │ └── AccountViewModels.cs │ ├── Components │ ├── ISystemClock.cs │ ├── SystemClock.cs │ ├── CartSummaryComponent.cs │ └── GenreMenuComponent.cs │ ├── Scripts │ └── _references.js │ ├── MessageServices.cs │ ├── config.json │ ├── MusicStore.csproj │ ├── Program.cs │ ├── Controllers │ ├── HomeController.cs │ ├── StoreController.cs │ ├── CheckoutController.cs │ └── ShoppingCartController.cs │ └── Platform.cs ├── test ├── MusicStore.E2ETests │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── MusicStoreConfig.cs │ ├── remoteDeploymentConfig.json │ ├── Common │ │ ├── Extensions.cs │ │ ├── XunitLogger.cs │ │ ├── DbUtils.cs │ │ ├── HtmlDOMHelper.cs │ │ └── Helpers.cs │ ├── RemoteDeploymentConfig.cs │ ├── MusicStore.E2ETests.csproj │ ├── NtlmAuthentationTest.cs │ └── OpenIdConnectTests.cs ├── RemoteTest.cmd ├── MusicStore.Test │ ├── TestAppSettings.cs │ ├── MusicStore.Test.csproj │ ├── TestSession.cs │ ├── GenreMenuComponentTest.cs │ ├── Models │ │ └── ShoppingCartTest.cs │ ├── CartSummaryComponentTest.cs │ ├── HomeControllerTest.cs │ └── ManageControllerTest.cs └── RemoteTest.ps1 ├── CONTRIBUTING.md ├── tools ├── BundleAndDeploy.cmd └── BundleAndDeploy.ps1 ├── appveyor.yml ├── NuGet.config ├── LICENSE.txt ├── .travis.yml ├── .dockerignore ├── .gitignore ├── docker-compose.windows.yml ├── Dockerfile.windows ├── .gitattributes ├── README.md └── MusicStore.sln /.deployment: -------------------------------------------------------------------------------- 1 | +[config] 2 | +project = src/MusicStore/MusicStore.csproj 3 | -------------------------------------------------------------------------------- /samples/MusicStore/ForTesting/Readme.md: -------------------------------------------------------------------------------- 1 | The contents of this folder are used for end to end testing. -------------------------------------------------------------------------------- /samples/MusicStore/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /samples/MusicStore/Areas/Admin/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/favicon.ico -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/Images/logo.png -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/Images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/Images/placeholder.png -------------------------------------------------------------------------------- /test/MusicStore.E2ETests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)] 4 | -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/Images/home-showcase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/Images/home-showcase.png -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /samples/MusicStore/wwwroot/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/friism/MusicStore/HEAD/samples/MusicStore/wwwroot/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ====== 3 | 4 | Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo. 5 | -------------------------------------------------------------------------------- /samples/MusicStore/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Error"; 3 | } 4 | 5 |
8 | Thank you for confirming your email. Please Click here to Log in. 9 |
10 |Thanks for your order! Your order number is: @Model
10 | 11 |12 | How about shopping for some more music in our 13 | Store 14 |
-------------------------------------------------------------------------------- /samples/MusicStore/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 | 6 |10 | Your password has been reset. Please Click here to log in. 11 |
12 |8 | Select from @Model.Count() genres: 9 |
10 |10 | Please check your email to reset your password. 11 |
12 |13 | For demo purpose only: Click here to reset the password 14 |
15 |10 | Please check your email to activate your account. 11 |
12 |13 | Demo/testing purposes only: The sample displays the code and user id in the page: Click here to confirm your email: 14 |
15 |10 | Demo link display page - Not for production use. 11 |
12 | 13 | @if (ViewBag.Link != null) 14 | { 15 |
16 | For DEMO only: You can click this link to confirm the email: [[link]]
17 |
18 | Please change this code to register an email service in IdentityConfig to send an email.
19 |
12 | Are you sure you want to delete the album titled 13 | @Model.Title? 14 |
15 | 16 | @using (Html.BeginForm()) 17 | { 18 |19 | 20 |
21 |22 | @Html.ActionLink("Back to List", "Index") 23 |
24 | } 25 | } 26 | else 27 | { 28 | @Html.Label(null, "Unable to locate the album") 29 | } -------------------------------------------------------------------------------- /samples/MusicStore/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @inject IOptions
9 |
10 |
11 |
15 | Genre: 16 | @Model.Genre.Name 17 |
18 |19 | Artist: 20 | @Model.Artist.Name 21 |
22 |23 | Price: 24 | 25 |
26 | 29 |13 | There are no external authentication services configured. See this article 14 | for details on setting up this ASP.NET application to support logging in via external services. 15 |
16 |56 | @Html.ActionLink("Edit", "Edit", new { id = Model.AlbumId }) | 57 | @Html.ActionLink("Back to List", "Index") 58 |
-------------------------------------------------------------------------------- /samples/MusicStore/ForTesting/Mocks/Common/CustomStateDataFormat.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authentication; 2 | using Newtonsoft.Json; 3 | 4 | namespace MusicStore.Mocks.Common 5 | { 6 | public class CustomStateDataFormat : ISecureDataFormat7 | You do not have a local username/password for this site. Add a local 8 | account so you can log in without an external login. 9 |
10 | 11 | 35 | 36 | @section Scripts { 37 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 38 | } -------------------------------------------------------------------------------- /samples/MusicStore/ForTesting/Mocks/Twitter/CustomTwitterStateDataFormat.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authentication; 2 | using Microsoft.AspNetCore.Authentication.Twitter; 3 | using Newtonsoft.Json; 4 | 5 | namespace MusicStore.Mocks.Twitter 6 | { 7 | ///10 | @Html.ActionLink("Create New", "Create") 11 |
12 || 15 | @Html.DisplayNameFor(model => model.Genre.Name) 16 | | 17 |18 | @Html.DisplayNameFor(model => model.FirstOrDefault().Artist.Name) 19 | | 20 |21 | @Html.DisplayNameFor(model => model.FirstOrDefault().Title) 22 | | 23 |24 | @Html.DisplayNameFor(model => model.FirstOrDefault().Price) 25 | | 26 |27 | |
|---|---|---|---|---|
| 33 | @Html.DisplayFor(modelItem => item.Genre.Name) 34 | | 35 |
36 | @if (item.Artist.Name.Length <= 25)
37 | {
38 | @item.Artist.Name
39 | }
40 | else
41 | {
42 | @item.Artist.Name.Substring(0, 25) |
45 |
46 | @if (item.Title.Length <= 25)
47 | {
48 | @item.Title
49 | }
50 | else
51 | {
52 | @item.Title.Substring(0, 25) |
55 | 56 | @Html.DisplayFor(modelItem => item.Price) 57 | | 58 |59 | @Html.ActionLink("Edit", "Edit", new { id = item.AlbumId }) | 60 | @Html.ActionLink("Details", "Details", new { id = item.AlbumId }) | 61 | @Html.ActionLink("Delete", "RemoveAlbum", new { id = item.AlbumId }) 62 | | 63 |
@ViewBag.StatusMessage
9 | @if (Model.CurrentLogins.Count > 0) 10 | { 11 || @account.LoginProvider | 18 |19 | @if (ViewBag.ShowRemoveButton) 20 | { 21 | 28 | } 29 | else 30 | { 31 | @: 32 | } 33 | | 34 |
@ViewData["StatusMessage"]
8 | 9 |31 | Phone Numbers can used as a second factor of verification in two-factor authentication. 32 | See this article 33 | for details on setting up this ASP.NET application to support two-factor authentication using SMS. 34 |
35 | @*@(Model.PhoneNumber ?? "None") 36 | @if (Model.PhoneNumber != null) 37 | { 38 |53 | There are no two-factor authentication providers configured. See this article 54 | for setting up this application to support two-factor authentication. 55 |
56 | @*@if (Model.TwoFactor) 57 | { 58 | 61 | } 62 | else 63 | { 64 | 67 | }*@ 68 || 66 | Album Name 67 | | 68 |69 | Price (each) 70 | | 71 |72 | Quantity 73 | | 74 |75 | |
|---|---|---|---|
| 80 | @item.Album.Title 81 | | 82 |83 | @item.Album.Price 84 | | 85 |86 | @item.Count 87 | | 88 |89 | 91 | Remove from cart 92 | 93 | | 94 |
| 98 | Total 99 | | 100 |101 | | 102 | | 103 | @Model.CartTotal 104 | | 105 |