Skip to content

Commit 31753fc

Browse files
author
Carlos Cañizares Estévez
committed
MVC: Finish Orders integration (detail), validations, some refactor ...
Orders: Detail Query, new field in OrderDetail.. Identity: Validations in Register View, ensure all claims are returned in user end point..
1 parent 0ac9526 commit 31753fc

59 files changed

Lines changed: 379 additions & 781 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docker-compose.override.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ version: '2'
99

1010
services:
1111

12-
webmvc:
13-
environment:
14-
- CatalogUrl=http://catalog.api
15-
- OrderingUrl=http://ordering.api:5102
12+
# webmvc:
13+
# environment:
14+
# - CatalogUrl=http://catalog.api
15+
# - OrderingUrl=http://ordering.api:5102
1616
#- IdentityUrl=http://104.40.62.65:5105 #Remote: VM Needs to have public access at 5105.
17-
- IdentityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker.
18-
- BasketUrl=http://basket.api:5103
19-
ports:
20-
- "5100:5100"
17+
# - IdentityUrl=http://identity.service:5105 #Local: You need a entry in windows host file to run identity in local docker.
18+
# - BasketUrl=http://basket.api:5103
19+
# ports:
20+
# - "5100:5100"
2121

2222
webspa:
2323
environment:
@@ -39,38 +39,31 @@ services:
3939

4040
catalog.api:
4141
environment:
42-
- ConnectionString=Server=business.data;Database=CatalogDB;User Id=sa;Password=Pass@word
42+
- ConnectionString=Server=sql.data;Database=CatalogDB;User Id=sa;Password=Pass@word
4343
ports:
4444
- "5101:80"
4545

46-
ordering.api:
47-
environment:
48-
- ConnectionString=Server=business.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
49-
- identityUrl=http://identity.service:5105 #local
46+
# ordering.api:
47+
# environment:
48+
# - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
49+
# - identityUrl=http://identity.service:5105 #local
5050
#- identityUrl=http://104.40.62.65:5105 #remote
51-
ports:
52-
- "5102:5102"
51+
# ports:
52+
# - "5102:5102"
5353

5454
identity.service:
5555
environment:
5656
- SpaClient=http://localhost:5104
57-
- ConnectionStrings__DefaultConnection=Server=identity.data;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word
57+
- ConnectionStrings__DefaultConnection=Server=sql.data;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word
5858
#- MvcClient=http://104.40.62.65:5100 #Remote: VM Needs to have public access at 5105.
5959
- MvcClient=http://localhost:5100 #Local: You need a entry in windows host file to run identity in local docker.
6060
#10.0.75.1:5105 CCE/TODO: try to avoid host entry.
6161
ports:
6262
- "5105:5105"
6363

64-
identity.data:
64+
sql.data:
6565
environment:
6666
- SA_PASSWORD=Pass@word
6767
- ACCEPT_EULA=Y
6868
ports:
6969
- "5433:1433"
70-
71-
business.data:
72-
environment:
73-
- SA_PASSWORD=Pass@word
74-
- ACCEPT_EULA=Y
75-
ports:
76-
- "5434:1433"

docker-compose.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
version: '2'
88

99
services:
10-
webmvc:
11-
image: eshop/web
12-
depends_on:
13-
- identity.service
14-
- basket.api
10+
# webmvc:
11+
# image: eshop/web
12+
# depends_on:
13+
# - identity.service
14+
# - basket.api
1515

1616
webspa:
1717
image: eshop/webspa
@@ -28,22 +28,19 @@ services:
2828
catalog.api:
2929
image: eshop/catalog.api
3030
depends_on:
31-
- business.data
31+
- sql.data
3232

33-
ordering.api:
34-
image: eshop/ordering.api
35-
depends_on:
36-
- business.data
33+
# ordering.api:
34+
# image: eshop/ordering.api
35+
# depends_on:
36+
# - sql.data
3737

3838
identity.service:
3939
image: eshop/identity
4040
depends_on:
41-
- identity.data
42-
43-
identity.data:
44-
image: microsoft/mssql-server-linux
41+
- sql.data
4542

46-
business.data:
43+
sql.data:
4744
image: microsoft/mssql-server-linux
4845

4946
basket.data:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"Logging": {
33
"IncludeScopes": false,
44
"LogLevel": {
@@ -7,6 +7,6 @@
77
"Microsoft": "Information"
88
}
99
},
10-
"IdentityUrl": "http://localhost:5000",
10+
"IdentityUrl": "http://identity.service:5105",
1111
"ConnectionString": "127.0.0.1"
1212
}

src/Services/Catalog/Catalog.API/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"ConnectionString": "Server=tcp:127.0.0.1,5434;Initial Catalog=CatalogDB;User Id=sa;Password=Pass@word",
2+
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=CatalogDB;User Id=sa;Password=Pass@word",
33
"Logging": {
44
"IncludeScopes": false,
55
"LogLevel": {

src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public async Task<IActionResult> Login(LoginViewModel model)
9999
props = new AuthenticationProperties
100100
{
101101
IsPersistent = true,
102-
ExpiresUtc = DateTimeOffset.UtcNow.AddMonths(1)
102+
ExpiresUtc = DateTimeOffset.UtcNow.AddYears(10)
103103
};
104104
};
105105

src/Services/Identity/eShopOnContainers.Identity/Data/ApplicationContextSeed.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ private ApplicationUser GetDefaultUser()
6161
CardType = 1,
6262
City = "Redmond",
6363
Country = "U.S.",
64-
CountryCode = "91",
6564
Email = "demouser@microsoft.com",
6665
Expiration = "12/20",
6766
Id = Guid.NewGuid().ToString(),

src/Services/Identity/eShopOnContainers.Identity/Data/Migrations/20161019122215_Init_Scheme.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
4949
City = table.Column<string>(nullable: true),
5050
ConcurrencyStamp = table.Column<string>(nullable: true),
5151
Country = table.Column<string>(nullable: true),
52-
CountryCode = table.Column<string>(nullable: true),
5352
Email = table.Column<string>(maxLength: 256, nullable: true),
5453
EmailConfirmed = table.Column<bool>(nullable: false),
5554
Expiration = table.Column<string>(nullable: true),
56-
Latitude = table.Column<double>(nullable: false),
5755
LockoutEnabled = table.Column<bool>(nullable: false),
5856
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
59-
Longitude = table.Column<double>(nullable: false),
6057
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
6158
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
6259
PasswordHash = table.Column<string>(nullable: true),
@@ -65,7 +62,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
6562
SecurityNumber = table.Column<string>(nullable: true),
6663
SecurityStamp = table.Column<string>(nullable: true),
6764
State = table.Column<string>(nullable: true),
68-
StateCode = table.Column<string>(nullable: true),
6965
Street = table.Column<string>(nullable: true),
7066
TwoFactorEnabled = table.Column<bool>(nullable: false),
7167
UserName = table.Column<string>(maxLength: 256, nullable: true),

src/Services/Identity/eShopOnContainers.Identity/Extensions/PrincipalExtensions.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/Services/Identity/eShopOnContainers.Identity/Models/ApplicationUser.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,29 @@ namespace eShopOnContainers.Identity.Models
1010
// Add profile data for application users by adding properties to the ApplicationUser class
1111
public class ApplicationUser : IdentityUser
1212
{
13+
[Required]
1314
public string CardNumber { get; set; }
15+
[Required]
1416
public string SecurityNumber { get; set; }
17+
[Required]
18+
[RegularExpression(@"(0[1-9]|1[0-2])\/[0-9]{2}", ErrorMessage = "Expiration should match a valid MM/YY value")]
1519
public string Expiration { get; set; }
20+
[Required]
1621
public string CardHolderName { get; set; }
1722
public int CardType { get; set; }
23+
[Required]
1824
public string Street { get; set; }
25+
[Required]
1926
public string City { get; set; }
27+
[Required]
2028
public string State { get; set; }
21-
public string StateCode { get; set; }
29+
[Required]
2230
public string Country { get; set; }
23-
public string CountryCode { get; set; }
31+
[Required]
2432
public string ZipCode { get; set; }
25-
public double Latitude { get; set; }
26-
public double Longitude { get; set; }
33+
[Required]
2734
public string Name { get; set; }
35+
[Required]
2836
public string LastName { get; set; }
2937
}
3038
}

src/Services/Identity/eShopOnContainers.Identity/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"IIS Express": {
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
14-
"launchUrl": "http://localhost:5000",
14+
"launchUrl": "http://localhost:5105",
1515
"environmentVariables": {
1616
"ASPNETCORE_ENVIRONMENT": "Development"
1717
}

0 commit comments

Comments
 (0)