File tree Expand file tree Collapse file tree
application/CohortManager/src/Functions/Shared/Common/Extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ public static IHostBuilder AddAuthentication(this IHostBuilder hostBuilder)
99 {
1010
1111 hostBuilder . AddConfiguration < AuthConfig > ( out var authConfig ) ;
12+ hostBuilder . ConfigureServices ( ( context , services ) =>
13+ {
14+ services . AddSingleton < IFunctionContextAuthResolver , FunctionContextAuthResolver > ( ) ;
15+ } ) ;
1216 if ( ! authConfig . ByPassAuthentication )
1317 {
1418 hostBuilder . AddConfiguration < RoleConfig > ( ) ;
@@ -19,7 +23,7 @@ public static IHostBuilder AddAuthentication(this IHostBuilder hostBuilder)
1923 } ) ;
2024 hostBuilder . ConfigureServices ( ( context , services ) =>
2125 {
22- services . AddSingleton < IFunctionContextAuthResolver , FunctionContextAuthResolver > ( ) ;
26+
2327 services . AddSingleton < IAuthenticationService , JwtAuthentication > ( ) ;
2428 services . AddScoped < ICis2UserService , Cis2UserService > ( ) ;
2529 services . AddSingleton < IRoleManager , RoleManager > ( ) ;
You can’t perform that action at this time.
0 commit comments