Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 385fd05

Browse files
committed
Ready to use update!
1 parent f9f966e commit 385fd05

13 files changed

Lines changed: 2250 additions & 7 deletions

File tree

docs/images/consent-page.JPG

81.3 KB
Loading

docs/images/login.JPG

34.1 KB
Loading

docs/images/logs.JPG

39.9 KB
Loading

docs/images/profile.JPG

87 KB
Loading

docs/images/recover.JPG

20.9 KB
Loading

docs/images/register.JPG

35.2 KB
Loading

docs/quickstarts/build.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,17 @@ Wait and open Browser at http://localhost:4200
7575
.. raw:: html
7676

7777
<div style="position: relative; height: 0; overflow: hidden; max-width: 100%; height: auto;">
78-
<iframe src="https://player.vimeo.com/video/288762840?color=ff9933&title=0&byline=0" width="800" height="600" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
79-
</div>
78+
<iframe src="https://player.vimeo.com/video/288762840?color=ff9933&title=0&byline=0" width="800" height="350" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
79+
</div>
80+
81+
Expected
82+
--------
83+
84+
After a success build and run, 3 consoles app's must be open:
85+
86+
.. raw:: html
87+
88+
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/expectedsso.JPG?raw=true" width="480" />
89+
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/expectedusermanagement.JPG?raw=true" width="480" />
90+
<img src="https://github.com/brunohbrito/JP-Project/blob/master/docs/images/expectedangular.JPG?raw=true" width="480" />
91+

src/Backend/Jp.Infra.CrossCutting.IdentityServer/Configuration/SigninCredentialExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ public static class SigninCredentialExtension
3030
public static IIdentityServerBuilder AddSigninCredentialFromConfig(
3131
this IIdentityServerBuilder builder, IConfigurationSection options, ILogger logger, IHostingEnvironment env)
3232
{
33-
string keyType = System.Environment.GetEnvironmentVariable("CERTIFICATE_TYPE");
33+
string keyType = System.Environment.GetEnvironmentVariable("CERTIFICATE_TYPE") ?? options.GetSection("Type").Value;
3434
logger.LogInformation($"SigninCredentialExtension keyType is {keyType}");
3535

3636
switch (keyType)
3737
{
3838
case Temporary:
3939
logger.LogInformation($"SigninCredentialExtension adding Temporary Signing Credential");
40-
builder.AddDeveloperSigningCredential(true);
40+
builder.AddDeveloperSigningCredential(false);
4141
break;
4242

4343
case File:

src/Backend/Jp.UserManagement/appSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ConnectionStrings": {
33
// localdb
4-
"SSOConnection": "Server=(localdb)\\mssqllocaldb;Database=JpProject;Trusted_Connection=True;MultipleActiveResultSets=true",
4+
"SSOConnection": "Server=(localdb)\\mssqllocaldb;Database=JpProject;Trusted_Connection=True;MultipleActiveResultSets=true",
55
// Sql Server connection
66
// "SSOConnection": "Server=.;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
77
// MySql connection

src/Backend/Jp.UserManagement/jpProject_sso_log.txt

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,98 @@
44
2018-09-08 00:28:42.086 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
55
2018-09-08 00:32:39.048 -03:00 [INF] Authority URI: https://localhost:5000
66
2018-09-08 00:32:39.646 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
7+
2018-09-08 11:21:39.301 -03:00 [INF] Authority URI: https://localhost:5000
8+
2018-09-08 11:21:40.011 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
9+
2018-09-08 11:29:40.661 -03:00 [INF] Authority URI: https://localhost:5000
10+
2018-09-08 11:29:41.205 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
11+
2018-09-08 11:34:24.433 -03:00 [INF] Authority URI: https://localhost:5000
12+
2018-09-08 11:34:25.555 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
13+
2018-09-08 11:38:22.093 -03:00 [INF] Authority URI: https://localhost:5000
14+
2018-09-08 11:38:23.090 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
15+
2018-09-08 11:38:51.350 -03:00 [INF] Authority URI: https://localhost:5000
16+
2018-09-08 11:38:52.268 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
17+
2018-09-08 11:39:10.396 -03:00 [INF] Authority URI: https://localhost:5000
18+
2018-09-08 11:39:11.299 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
19+
2018-09-08 11:42:07.578 -03:00 [INF] Authority URI: https://localhost:5000
20+
2018-09-08 11:42:08.600 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
21+
2018-09-08 12:21:23.948 -03:00 [INF] Authority URI: https://localhost:5000
22+
2018-09-08 12:21:24.798 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
23+
2018-09-08 12:22:20.470 -03:00 [INF] Authority URI: https://localhost:5000
24+
2018-09-08 12:22:23.768 -03:00 [INF] User profile is available. Using 'C:\Users\Bruno\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
25+
2018-09-08 12:22:35.008 -03:00 [INF] Request starting HTTP/1.1 OPTIONS https://localhost:5003/management/user-data
26+
2018-09-08 12:22:35.034 -03:00 [INF] Policy execution successful.
27+
2018-09-08 12:22:35.045 -03:00 [INF] Request finished in 39.2727ms 204
28+
2018-09-08 12:22:35.082 -03:00 [INF] Request starting HTTP/1.1 GET https://localhost:5003/management/user-data
29+
2018-09-08 12:22:35.087 -03:00 [INF] Policy execution successful.
30+
2018-09-08 12:22:35.538 -03:00 [DBG] AuthenticationScheme: BearerIdentityServerAuthenticationIntrospection was successfully authenticated.
31+
2018-09-08 12:22:35.543 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
32+
2018-09-08 12:22:35.637 -03:00 [INF] Route matched with {action = "UserData", controller = "Management"}. Executing action Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement)
33+
2018-09-08 12:22:35.653 -03:00 [INF] Authorization was successful.
34+
2018-09-08 12:22:35.732 -03:00 [INF] Executing action method Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement) - Validation state: "Valid"
35+
2018-09-08 12:22:36.201 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=Jp.Infra.Migrations.Sql.Identity
36+
2018-09-08 12:22:36.543 -03:00 [INF] Executed DbCommand (13ms) [Parameters=[@__get_Item_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
37+
SELECT TOP(1) [e].[Id], [e].[AccessFailedCount], [e].[Bio], [e].[Company], [e].[ConcurrencyStamp], [e].[Email], [e].[EmailConfirmed], [e].[JobTitle], [e].[LockoutEnabled], [e].[LockoutEnd], [e].[Name], [e].[NormalizedEmail], [e].[NormalizedUserName], [e].[PasswordHash], [e].[PhoneNumber], [e].[PhoneNumberConfirmed], [e].[Picture], [e].[SecurityStamp], [e].[TwoFactorEnabled], [e].[Url], [e].[UserName]
38+
FROM [Users] AS [e]
39+
WHERE [e].[Id] = @__get_Item_0
40+
2018-09-08 12:22:36.663 -03:00 [INF] Executed action method Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 920.201ms.
41+
2018-09-08 12:22:36.684 -03:00 [INF] Executing ObjectResult, writing value of type 'Jp.Infra.CrossCutting.Tools.Model.DefaultResponse`1[[Jp.Application.ViewModels.ProfileViewModel, Jp.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
42+
2018-09-08 12:22:36.708 -03:00 [INF] Executed action Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement) in 1064.9976000000001ms
43+
2018-09-08 12:22:36.729 -03:00 [INF] Request finished in 1647.1325ms 200 application/json; charset=utf-8
44+
2018-09-08 12:23:07.883 -03:00 [INF] Request starting HTTP/1.1 OPTIONS https://localhost:5003/management/user-data
45+
2018-09-08 12:23:07.890 -03:00 [INF] Request starting HTTP/1.1 OPTIONS https://localhost:5003/management/has-password
46+
2018-09-08 12:23:07.894 -03:00 [INF] Policy execution successful.
47+
2018-09-08 12:23:07.898 -03:00 [INF] Policy execution successful.
48+
2018-09-08 12:23:07.901 -03:00 [INF] Request finished in 17.6647ms 204
49+
2018-09-08 12:23:07.908 -03:00 [INF] Request finished in 17.7101ms 204
50+
2018-09-08 12:23:07.922 -03:00 [INF] Request starting HTTP/1.1 GET https://localhost:5003/management/has-password
51+
2018-09-08 12:23:07.924 -03:00 [INF] Request starting HTTP/1.1 GET https://localhost:5003/management/user-data
52+
2018-09-08 12:23:07.928 -03:00 [INF] Policy execution successful.
53+
2018-09-08 12:23:07.930 -03:00 [INF] Policy execution successful.
54+
2018-09-08 12:23:08.106 -03:00 [DBG] AuthenticationScheme: BearerIdentityServerAuthenticationIntrospection was successfully authenticated.
55+
2018-09-08 12:23:08.109 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
56+
2018-09-08 12:23:08.115 -03:00 [INF] Route matched with {action = "HasPassword", controller = "Management"}. Executing action Jp.UserManagement.Controllers.ManagementController.HasPassword (Jp.UserManagement)
57+
2018-09-08 12:23:08.119 -03:00 [INF] Authorization was successful.
58+
2018-09-08 12:23:08.125 -03:00 [INF] Executing action method Jp.UserManagement.Controllers.ManagementController.HasPassword (Jp.UserManagement) - Validation state: "Valid"
59+
2018-09-08 12:23:08.132 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=Jp.Infra.Migrations.Sql.Identity
60+
2018-09-08 12:23:08.148 -03:00 [INF] Executed DbCommand (6ms) [Parameters=[@__get_Item_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
61+
SELECT TOP(1) [e].[Id], [e].[AccessFailedCount], [e].[Bio], [e].[Company], [e].[ConcurrencyStamp], [e].[Email], [e].[EmailConfirmed], [e].[JobTitle], [e].[LockoutEnabled], [e].[LockoutEnd], [e].[Name], [e].[NormalizedEmail], [e].[NormalizedUserName], [e].[PasswordHash], [e].[PhoneNumber], [e].[PhoneNumberConfirmed], [e].[Picture], [e].[SecurityStamp], [e].[TwoFactorEnabled], [e].[Url], [e].[UserName]
62+
FROM [Users] AS [e]
63+
WHERE [e].[Id] = @__get_Item_0
64+
2018-09-08 12:23:08.174 -03:00 [DBG] AuthenticationScheme: BearerIdentityServerAuthenticationIntrospection was successfully authenticated.
65+
2018-09-08 12:23:08.185 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
66+
2018-09-08 12:23:08.185 -03:00 [INF] Executed action method Jp.UserManagement.Controllers.ManagementController.HasPassword (Jp.UserManagement), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 56.732400000000005ms.
67+
2018-09-08 12:23:08.192 -03:00 [INF] Route matched with {action = "UserData", controller = "Management"}. Executing action Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement)
68+
2018-09-08 12:23:08.199 -03:00 [INF] Executing ObjectResult, writing value of type 'Jp.Infra.CrossCutting.Tools.Model.DefaultResponse`1[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
69+
2018-09-08 12:23:08.205 -03:00 [INF] Authorization was successful.
70+
2018-09-08 12:23:08.215 -03:00 [INF] Executed action Jp.UserManagement.Controllers.ManagementController.HasPassword (Jp.UserManagement) in 95.7615ms
71+
2018-09-08 12:23:08.219 -03:00 [INF] Executing action method Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement) - Validation state: "Valid"
72+
2018-09-08 12:23:08.224 -03:00 [INF] Request finished in 301.1508ms 200 application/json; charset=utf-8
73+
2018-09-08 12:23:08.228 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'ApplicationDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=Jp.Infra.Migrations.Sql.Identity
74+
2018-09-08 12:23:08.240 -03:00 [INF] Executed DbCommand (2ms) [Parameters=[@__get_Item_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
75+
SELECT TOP(1) [e].[Id], [e].[AccessFailedCount], [e].[Bio], [e].[Company], [e].[ConcurrencyStamp], [e].[Email], [e].[EmailConfirmed], [e].[JobTitle], [e].[LockoutEnabled], [e].[LockoutEnd], [e].[Name], [e].[NormalizedEmail], [e].[NormalizedUserName], [e].[PasswordHash], [e].[PhoneNumber], [e].[PhoneNumberConfirmed], [e].[Picture], [e].[SecurityStamp], [e].[TwoFactorEnabled], [e].[Url], [e].[UserName]
76+
FROM [Users] AS [e]
77+
WHERE [e].[Id] = @__get_Item_0
78+
2018-09-08 12:23:08.253 -03:00 [INF] Executed action method Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 25.5565ms.
79+
2018-09-08 12:23:08.258 -03:00 [INF] Executing ObjectResult, writing value of type 'Jp.Infra.CrossCutting.Tools.Model.DefaultResponse`1[[Jp.Application.ViewModels.ProfileViewModel, Jp.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'.
80+
2018-09-08 12:23:08.264 -03:00 [INF] Executed action Jp.UserManagement.Controllers.ManagementController.UserData (Jp.UserManagement) in 59.8158ms
81+
2018-09-08 12:23:08.271 -03:00 [INF] Request finished in 347.0027ms 200 application/json; charset=utf-8
82+
2018-09-08 12:23:08.492 -03:00 [INF] Request starting HTTP/1.1 OPTIONS https://localhost:5003/management/logs
83+
2018-09-08 12:23:08.503 -03:00 [INF] Policy execution successful.
84+
2018-09-08 12:23:08.506 -03:00 [INF] Request finished in 14.2636ms 204
85+
2018-09-08 12:23:08.513 -03:00 [INF] Request starting HTTP/1.1 GET https://localhost:5003/management/logs
86+
2018-09-08 12:23:08.516 -03:00 [INF] Policy execution successful.
87+
2018-09-08 12:23:08.675 -03:00 [DBG] AuthenticationScheme: BearerIdentityServerAuthenticationIntrospection was successfully authenticated.
88+
2018-09-08 12:23:08.677 -03:00 [DBG] AuthenticationScheme: Bearer was successfully authenticated.
89+
2018-09-08 12:23:08.681 -03:00 [INF] Route matched with {action = "GetLogs", controller = "Management"}. Executing action Jp.UserManagement.Controllers.ManagementController.GetLogs (Jp.UserManagement)
90+
2018-09-08 12:23:08.684 -03:00 [INF] Authorization was successful.
91+
2018-09-08 12:23:08.691 -03:00 [INF] Executing action method Jp.UserManagement.Controllers.ManagementController.GetLogs (Jp.UserManagement) - Validation state: "Valid"
92+
2018-09-08 12:23:08.707 -03:00 [INF] Entity Framework Core 2.1.2-rtm-30932 initialized 'EventStoreSQLContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: MigrationsAssembly=Jp.Infra.Migrations.Sql.Identity
93+
2018-09-08 12:23:08.754 -03:00 [INF] Executed DbCommand (14ms) [Parameters=[@__aggregateId_0='?' (DbType = Guid)], CommandType='"Text"', CommandTimeout='30']
94+
SELECT [e].[Id], [e].[AggregateId], [e].[Data], [e].[Action], [e].[CreationDate], [e].[User]
95+
FROM [StoredEvent] AS [e]
96+
WHERE [e].[AggregateId] = @__aggregateId_0
97+
ORDER BY [e].[CreationDate] DESC
98+
2018-09-08 12:23:08.787 -03:00 [INF] Executed action method Jp.UserManagement.Controllers.ManagementController.GetLogs (Jp.UserManagement), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 92.0813ms.
99+
2018-09-08 12:23:08.797 -03:00 [INF] Executing ObjectResult, writing value of type 'Jp.Infra.CrossCutting.Tools.Model.DefaultResponse`1[[System.Collections.Generic.IEnumerable`1[[Jp.Application.EventSourcedNormalizers.EventHistoryData, Jp.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'.
100+
2018-09-08 12:23:08.808 -03:00 [INF] Executed action Jp.UserManagement.Controllers.ManagementController.GetLogs (Jp.UserManagement) in 123.6422ms
101+
2018-09-08 12:23:08.814 -03:00 [INF] Request finished in 301.5674ms 200 application/json; charset=utf-8

0 commit comments

Comments
 (0)