forked from brunobritodev/JPProject.IdentityServer4.AdminUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Minor bugs correction - Added localization feature to SSO - Added translation feature to User Management - Silent refresh for angular-oauth2-oidc both for User Management and Admin - Changed Security Headers to accept Azure Application Insights
- Loading branch information
1 parent
13b68be
commit 8bca0b3
Showing
630 changed files
with
42,133 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html> | ||
<body> | ||
<script> | ||
parent.postMessage(location.hash, location.origin); | ||
</script> | ||
</body> | ||
</html> |
47 changes: 47 additions & 0 deletions
47
src/Frontend/Jp.UI.SSO/Configuration/LocalizationConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System.Globalization; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Localization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.Razor; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Options; | ||
|
||
namespace Jp.UI.SSO.Configuration | ||
{ | ||
public static class LocalizationConfig | ||
{ | ||
public static void AddMvcLocalization(this IServiceCollection services) | ||
{ | ||
|
||
services.AddLocalization(opts => { opts.ResourcesPath = "Resources"; }); | ||
|
||
services.AddMvc() | ||
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1) | ||
.AddViewLocalization( | ||
LanguageViewLocationExpanderFormat.Suffix, | ||
opts => { opts.ResourcesPath = "Resources"; }) | ||
.AddDataAnnotationsLocalization(); | ||
|
||
services.Configure<RequestLocalizationOptions>( | ||
opts => | ||
{ | ||
var supportedCultures = new[] | ||
{ | ||
new CultureInfo("pt-BR"), | ||
new CultureInfo("en"), | ||
}; | ||
|
||
opts.DefaultRequestCulture = new RequestCulture("pt-BR"); | ||
opts.SupportedCultures = supportedCultures; | ||
opts.SupportedUICultures = supportedCultures; | ||
}); | ||
} | ||
|
||
public static void UseLocalization(this IApplicationBuilder app) | ||
{ | ||
var options = app.ApplicationServices.GetService<IOptions<RequestLocalizationOptions>>(); | ||
app.UseRequestLocalization(options.Value); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.