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
35
35
36
36
public static IServiceCollection AddHttpClientServices ( this IServiceCollection services , IConfiguration configuration )
37
37
{
38
- services . AddSingleton < IHttpContextAccessor , HttpContextAccessor > ( ) ;
39
38
services . AddTransient < HttpClientAuthorizationDelegatingHandler > ( ) ;
40
- services . AddHttpClient ( "extendedhandlerlifetime" ) . SetHandlerLifetime ( Timeout . InfiniteTimeSpan ) ;
41
39
42
40
//add http client services
43
41
services . AddHttpClient ( "GrantClient" )
Original file line number Diff line number Diff line change 3
3
global using Microsoft . AspNetCore . Authentication . OpenIdConnect ;
4
4
global using Microsoft . AspNetCore . Authorization ;
5
5
global using Microsoft . AspNetCore . Mvc ;
6
- global using System . Security . Claims ;
7
6
global using System . Threading . Tasks ;
8
7
global using Microsoft . Extensions . Logging ;
9
8
global using Microsoft . Extensions . Options ;
17
16
global using Microsoft . AspNetCore . Http ;
18
17
global using System . Net . Http . Headers ;
19
18
global using System . Threading ;
20
- global using Microsoft . AspNetCore ;
19
+ global using Services . Common ;
21
20
global using Microsoft . AspNetCore . Hosting ;
22
21
global using WebhookClient ;
23
22
global using Microsoft . AspNetCore . Builder ;
Original file line number Diff line number Diff line change 1
1
var builder = WebApplication . CreateBuilder ( args ) ;
2
2
3
+ builder . AddServiceDefaults ( ) ;
3
4
builder . Services . AddSession ( opt =>
4
5
{
5
6
opt . Cookie . Name = ".eShopWebhooks.Session" ;
12
13
. AddMvc ( ) ;
13
14
builder . Services . AddControllers ( ) ;
14
15
var 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 ( ) ;
27
17
28
18
app . Map ( "/check" , capp =>
29
19
{
62
52
63
53
app . UseStaticFiles ( ) ;
64
54
app . UseSession ( ) ;
65
- app . UseRouting ( ) ;
66
55
app . UseAuthentication ( ) ;
67
56
app . UseAuthorization ( ) ;
68
57
app . MapDefaultControllerRoute ( ) ;
Original file line number Diff line number Diff line change 17
17
<PackageReference Include =" Microsoft.VisualStudio.Web.CodeGeneration.Design" />
18
18
</ItemGroup >
19
19
20
+ <ItemGroup >
21
+ <ProjectReference Include =" ..\..\Services\Services.Common\Services.Common.csproj" />
22
+ </ItemGroup >
23
+
20
24
</Project >
You can’t perform that action at this time.
0 commit comments