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

Commit 73575c8

Browse files
Merge pull request #17 from brunohbrito/dev
bug fix
2 parents 150170b + 90e5b78 commit 73575c8

File tree

11 files changed

+38
-62
lines changed

11 files changed

+38
-62
lines changed

build/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ services:
3838
ApplicationSettings:UserManagementURL: http://localhost:4200
3939
ApplicationSettings:IS4AdminUi: http://localhost:4300
4040
ApplicationSettings:ResourceServerURL: http://localhost:5003
41+
CertificateOptions:Type: Temporary
4142

4243
# #############################
4344
# # Management API

build/jpproject-docker-windows.zip

20 Bytes
Binary file not shown.

src/Backend/Jp.UserManagement/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"SendEmail": "false"
3232
},
3333
"ApplicationSettings": {
34-
"DatabaseType": "MySql"
34+
"DatabaseType": "MySql",
35+
"Authority": "https://localhost:5001"
3536
}
3637
}

src/Backend/Jp.UserManagement/tempkey.rsa

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Frontend/Jp.UI.SSO/Controllers/Home/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public IActionResult SetLanguage(string culture, string returnUrl = "")
6666
if (string.IsNullOrEmpty(returnUrl))
6767
return RedirectToAction("Index");
6868

69-
return LocalRedirect(returnUrl);
69+
return LocalRedirect(Request.Headers["Referer"].ToString());
7070
}
7171
}
7272
}

src/Frontend/Jp.UI.SSO/Views/Shared/_SelectLanguagePartial.cshtml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
@using System.Threading.Tasks
2-
@using Microsoft.AspNetCore.Builder
3-
@using Microsoft.AspNetCore.Localization
4-
@using Microsoft.AspNetCore.Mvc.Localization
5-
@using Microsoft.Extensions.Options
6-
1+
@using Microsoft.AspNetCore.Mvc.Localization
72
@inject IViewLocalizer Localizer
83

94
<li class="nav-item dropdown">
@@ -14,10 +9,10 @@
149
<div class="dropdown-header text-center">
1510
<strong>@Localizer["Title-Available-Languages"]</strong>
1611
</div>
17-
<a asp-controller="Home" asp-action="SetLanguage" asp-route-culture="pt-BR" asp-route-returnUrl="@Context.Request.Path" class="dropdown-item">
12+
<a asp-controller="Home" asp-action="SetLanguage" asp-route-culture="pt-BR" asp-route-returnUrl="@Context.Request.Path.ToString().Replace("/", "")" class="dropdown-item">
1813
<i class="flag-icon flag-icon-br"></i> @Localizer["Title-Português"]
1914
</a>
20-
<a asp-controller="Home" asp-action="SetLanguage" asp-route-culture="en" asp-route-returnUrl="@Context.Request.Path" class="dropdown-item">
15+
<a asp-controller="Home" asp-action="SetLanguage" asp-route-culture="en" asp-route-returnUrl="@Context.Request.Path.ToString().Replace("/", "")" class="dropdown-item">
2116
<i class="flag-icon flag-icon-us"></i> @Localizer["Title-English"]
2217
</a>
2318
</div>

src/Frontend/Jp.UI.SSO/appsettings.Development.json

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

src/Frontend/Jp.UI.SSO/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"ApplicationSettings": {
45-
"EnableExternalProviders": true,
45+
"EnableExternalProviders": "true",
4646
"UserManagementURL": "http://localhost:4200",
4747
"IS4AdminUi": "http://localhost:4300",
4848
"DatabaseType": "MySql",

src/Frontend/Jp.UI.SSO/tempkey.rsa

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/JpProject.Domain.Tests/UserTests/Fakers/UserCommandFaker.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ public static Faker<AddLoginCommand> GenerateAddLoginCommand()
4545
);
4646
}
4747

48+
public static Faker<SendResetLinkCommand> GenerateSendResetLinkCommand(string username = null, string email = null)
49+
{
50+
return new Faker<SendResetLinkCommand>().CustomInstantiator(
51+
f => new SendResetLinkCommand(
52+
email ?? f.Person.Email,
53+
f.Person.UserName
54+
)
55+
);
56+
}
4857

4958
}
5059
}

0 commit comments

Comments
 (0)