Skip to content

Commit

Permalink
merge hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed May 23, 2022
2 parents f38e8a1 + 61c68a7 commit d140921
Show file tree
Hide file tree
Showing 8 changed files with 2,256 additions and 2,713 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
WORKDIR /src
Expand Down
6 changes: 3 additions & 3 deletions src/EthernaCredit.Domain/EthernaCredit.Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Etherna.CreditSystem.Domain</RootNamespace>

<Authors>Etherna Sagl</Authors>
Expand All @@ -14,8 +14,8 @@

<ItemGroup>
<PackageReference Include="Etherna.DomainEvents" Version="1.3.1" />
<PackageReference Include="MongODM.Core" Version="0.23.0-alpha.79" />
<PackageReference Include="Nethereum.Util" Version="4.1.1" />
<PackageReference Include="MongODM.Core" Version="0.23.0-alpha.106" />
<PackageReference Include="Nethereum.Util" Version="4.5.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Etherna.CreditSystem.Persistence</RootNamespace>

<Authors>Etherna Sagl</Authors>
Expand Down
4 changes: 2 additions & 2 deletions src/EthernaCredit.Services/EthernaCredit.Services.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<RootNamespace>Etherna.CreditSystem.Services</RootNamespace>

Expand All @@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="Etherna.DomainEvents.AspNetCore" Version="1.3.1" />
<PackageReference Include="EthernaACR" Version="0.3.0" />
<PackageReference Include="EthernaServicesClient.AspNetCore" Version="0.3.0-alpha.34" />
<PackageReference Include="EthernaServicesClient.AspNetCore" Version="0.3.0-alpha.38" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Etherna" Version="0.3.0-alpha.7" />
</ItemGroup>

Expand Down
22 changes: 11 additions & 11 deletions src/EthernaCredit/EthernaCredit.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Etherna.CreditSystem</RootNamespace>

<Authors>Etherna Sagl</Authors>
Expand All @@ -15,22 +15,22 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitVersion.MsBuild" Version="5.8.1">
<PackageReference Include="GitVersion.MsBuild" Version="5.10.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.28" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.14" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.29" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
<PackageReference Include="MongODM" Version="0.23.0-alpha.79" />
<PackageReference Include="MongODM.AspNetCore.UI" Version="0.23.0-alpha.79" />
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
<PackageReference Include="MongODM" Version="0.23.0-alpha.106" />
<PackageReference Include="MongODM.AspNetCore.UI" Version="0.23.0-alpha.106" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
<PackageReference Include="Serilog.Exceptions" Version="8.0.0" />
<PackageReference Include="Serilog.Exceptions" Version="8.2.0" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="8.4.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 14 additions & 1 deletion src/EthernaCredit/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public void ConfigureServices(IServiceCollection services)
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options =>
{
// Set properties.
options.Cookie.MaxAge = TimeSpan.FromDays(30);
options.Cookie.Name = CommonConsts.SharedCookieApplicationName;
options.AccessDeniedPath = "/AccessDenied";

Expand Down Expand Up @@ -242,6 +243,8 @@ public void ConfigureServices(IServiceCollection services)
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
services.AddSwaggerGen(options =>
{
options.SupportNonNullableReferenceTypes();

//add a custom operation filter which sets default values
options.OperationFilter<SwaggerDefaultValues>();

Expand All @@ -252,11 +255,21 @@ public void ConfigureServices(IServiceCollection services)
});

// Configure Etherna SSO Client services.
services.AddEthernaSsoClientForServices(
var ethernaServiceClientBuilder = services.AddEthernaSsoClientForServices(
new Uri(Configuration["SsoServer:BaseUrl"] ?? throw new ServiceConfigurationException()),
Configuration["SsoServer:Clients:SsoServer:ClientId"] ?? throw new ServiceConfigurationException(),
Configuration["SsoServer:Clients:SsoServer:Secret"] ?? throw new ServiceConfigurationException());

var clientCredentialTask = ethernaServiceClientBuilder.GetClientCredentialsTokenRequestAsync();
clientCredentialTask.Wait();
var clientCredential = clientCredentialTask.Result;

// Register token manager.
services.AddAccessTokenManagement(options =>
{
options.Client.Clients.Add(ethernaServiceClientBuilder.ClientName, clientCredential);
});

// Configure setting.
var assemblyVersion = new AssemblyVersion(GetType().GetTypeInfo().Assembly);
services.Configure<ApplicationSettings>(options =>
Expand Down
Loading

0 comments on commit d140921

Please sign in to comment.