11// Copyright (c) Microsoft. All rights reserved.
22
3- using System . Reflection ;
4- using System . Text . Json ;
53using Microsoft . AspNetCore . Authentication ;
64using Microsoft . AspNetCore . Authentication . JwtBearer ;
75using Microsoft . Extensions . Options ;
86using Microsoft . Identity . Web ;
9- using Microsoft . SemanticKernel ;
10- using Microsoft . SemanticKernel . AI . Embeddings ;
11- using Microsoft . SemanticKernel . Connectors . AI . OpenAI . TextEmbedding ;
12- using Microsoft . SemanticKernel . Connectors . Memory . Qdrant ;
13- using Microsoft . SemanticKernel . Memory ;
14- using Microsoft . SemanticKernel . Reliability ;
15- using Microsoft . SemanticKernel . SkillDefinition ;
16- using Microsoft . SemanticKernel . TemplateEngine ;
177using SemanticKernel . Service . Auth ;
188using SemanticKernel . Service . Config ;
199using SemanticKernel . Service . Skills ;
@@ -26,7 +16,7 @@ internal static class ServicesExtensions
2616 /// <summary>
2717 /// Parse configuration into options.
2818 /// </summary>
29- internal static IServiceCollection AddOptions ( this IServiceCollection services , Microsoft . Extensions . Configuration . ConfigurationManager configuration )
19+ internal static IServiceCollection AddOptions ( this IServiceCollection services , ConfigurationManager configuration )
3020 {
3121 // General configuration
3222 services . AddOptions < ServiceOptions > ( )
@@ -102,21 +92,21 @@ internal static IServiceCollection AddAuthorization(this IServiceCollection serv
10292 {
10393 case AuthorizationOptions . AuthorizationType . AzureAd :
10494 services . AddAuthentication ( JwtBearerDefaults . AuthenticationScheme )
105- . AddMicrosoftIdentityWebApi ( configuration . GetSection ( $ "{ AuthorizationOptions . PropertyName } :AzureAd") ) ;
95+ . AddMicrosoftIdentityWebApi ( configuration . GetSection ( $ "{ AuthorizationOptions . PropertyName } :AzureAd") ) ;
10696 break ;
10797
10898 case AuthorizationOptions . AuthorizationType . ApiKey :
10999 services . AddAuthentication ( ApiKeyAuthenticationHandler . AuthenticationScheme )
110- . AddScheme < ApiKeyAuthenticationSchemeOptions , ApiKeyAuthenticationHandler > (
111- ApiKeyAuthenticationHandler . AuthenticationScheme ,
112- options => options . ApiKey = config . ApiKey ) ;
100+ . AddScheme < ApiKeyAuthenticationSchemeOptions , ApiKeyAuthenticationHandler > (
101+ ApiKeyAuthenticationHandler . AuthenticationScheme ,
102+ options => options . ApiKey = config . ApiKey ) ;
113103 break ;
114104
115105 case AuthorizationOptions . AuthorizationType . None :
116106 services . AddAuthentication ( PassThroughAuthenticationHandler . AuthenticationScheme )
117- . AddScheme < AuthenticationSchemeOptions , PassThroughAuthenticationHandler > (
118- authenticationScheme : PassThroughAuthenticationHandler . AuthenticationScheme ,
119- configureOptions : null ) ;
107+ . AddScheme < AuthenticationSchemeOptions , PassThroughAuthenticationHandler > (
108+ authenticationScheme : PassThroughAuthenticationHandler . AuthenticationScheme ,
109+ configureOptions : null ) ;
120110 break ;
121111
122112 default :
0 commit comments