This repository was archived by the owner on Nov 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-17
lines changed Expand file tree Collapse file tree 4 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ public static IServiceCollection AddCustomAuthentication(this IServiceCollection
3535
3636 public static IServiceCollection AddHttpClientServices ( this IServiceCollection services , IConfiguration configuration )
3737 {
38- services . AddSingleton < IHttpContextAccessor , HttpContextAccessor > ( ) ;
3938 services . AddTransient < HttpClientAuthorizationDelegatingHandler > ( ) ;
40- services . AddHttpClient ( "extendedhandlerlifetime" ) . SetHandlerLifetime ( Timeout . InfiniteTimeSpan ) ;
4139
4240 //add http client services
4341 services . AddHttpClient ( "GrantClient" )
Original file line number Diff line number Diff line change 33global using Microsoft . AspNetCore . Authentication . OpenIdConnect ;
44global using Microsoft . AspNetCore . Authorization ;
55global using Microsoft . AspNetCore . Mvc ;
6- global using System . Security . Claims ;
76global using System . Threading . Tasks ;
87global using Microsoft . Extensions . Logging ;
98global using Microsoft . Extensions . Options ;
1716global using Microsoft . AspNetCore . Http ;
1817global using System . Net . Http . Headers ;
1918global using System . Threading ;
20- global using Microsoft . AspNetCore ;
19+ global using Services . Common ;
2120global using Microsoft . AspNetCore . Hosting ;
2221global using WebhookClient ;
2322global using Microsoft . AspNetCore . Builder ;
Original file line number Diff line number Diff line change 11var builder = WebApplication . CreateBuilder ( args ) ;
22
3+ builder . AddServiceDefaults ( ) ;
34builder . Services . AddSession ( opt =>
45 {
56 opt . Cookie . Name = ".eShopWebhooks.Session" ;
1213 . AddMvc ( ) ;
1314builder . Services . AddControllers ( ) ;
1415var app = builder . Build ( ) ;
15-
16- var pathBase = app . Configuration [ "PATH_BASE" ] ;
17- if ( ! string . IsNullOrEmpty ( pathBase ) )
18- {
19- app . UsePathBase ( pathBase ) ;
20- }
21-
22- if ( ! app . Environment . IsDevelopment ( ) )
23- {
24- app . UseExceptionHandler ( "/Error" ) ;
25- // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
26- }
16+ app . UseServiceDefaults ( ) ;
2717
2818app . Map ( "/check" , capp =>
2919{
6252
6353app . UseStaticFiles ( ) ;
6454app . UseSession ( ) ;
65- app . UseRouting ( ) ;
6655app . UseAuthentication ( ) ;
6756app . UseAuthorization ( ) ;
6857app . MapDefaultControllerRoute ( ) ;
Original file line number Diff line number Diff line change 1717 <PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" />
1818 </ItemGroup >
1919
20+ <ItemGroup >
21+ <ProjectReference Include =" ..\..\Services\Services.Common\Services.Common.csproj" />
22+ </ItemGroup >
23+
2024</Project >
You can’t perform that action at this time.
0 commit comments