expose nativeauth state provider for internal subclassing
3ebf904b
Michael Schmitz
committed
succeeded
2 changed files
ServiceCollectionExtensions.cs
/WPE.App.Authentication.Maui/ServiceCollectionExtensions.cs-2+13
/WPE.App.Authentication.Maui/ServiceCollectionExtensions.cs
Add comment 23 /// <param name="authConfig">Allows the configuration of token request endpoints</param>
Add comment 24 /// <param name="subscriptionKeyConfig">Allows tzhe configuration of hosts to set a subscriptionKey for</param>
Add comment 25 /// <returns>ServiceCollection to chain calls</returns>
Add comment 26 Minus   internal static IServiceCollection AddNativeAuthentication(this IServiceCollection services, Action<AuthenticationConfiguration> authConfig, Action<SubscriptionKeyConfiguration> subscriptionKeyConfig)
Add comment 26 Plus   internal static IServiceCollection AddNativeAuthentication(this IServiceCollection services, Action<AuthenticationConfiguration> authConfig, Action<SubscriptionKeyConfiguration> subscriptionKeyConfig) =>
Add comment 27 Plus   services.AddNativeAuthentication<NativeAuthenticationStateProvider>(authConfig, subscriptionKeyConfig);
Add comment 28 Plus  
Add comment 29 Plus   /// <summary>
Add comment 30 Plus   /// Add all required authentication services for a native login (using web authenticator) and the subscriptionKey handler
Add comment 31 Plus   /// </summary>
Add comment 32 Plus   /// <typeparam name="TAuthenticationStateProvider">Allows for a customized implementation</typeparam>
Add comment 33 Plus   /// <param name="services">Service collection to add to</param>
Add comment 34 Plus   /// <param name="authConfig">Allows the configuration of token request endpoints</param>
Add comment 35 Plus   /// <param name="subscriptionKeyConfig">Allows tzhe configuration of hosts to set a subscriptionKey for</param>
Add comment 36 Plus   /// <returns>ServiceCollection to chain calls</returns>
Add comment 37 Plus   internal static IServiceCollection AddNativeAuthentication<TAuthenticationStateProvider>(this IServiceCollection services, Action<AuthenticationConfiguration> authConfig, Action<SubscriptionKeyConfiguration> subscriptionKeyConfig) where TAuthenticationStateProvider : NativeAuthenticationStateProvider
Add comment 27 38 {
Add comment 28 39 services.AddOptions();
Add comment 29 40 services.AddAuthorizationCore();
Add comment 38 49 #endif
Add comment 39 50
Add comment 40 51 services.AddSingleton<IAuthClient, AuthClient>();
Add comment 41 Minus   services.AddBaseAuthentication<NativeAuthenticationStateProvider>();
Add comment 52 Plus   services.AddBaseAuthentication<TAuthenticationStateProvider>();
Add comment 42 53
Add comment 43 54 services.AddTransient<AuthorizationMessageHandler>();
Add comment 44 55 services.Configure(authConfig);
WPE.App.Authentication.Maui.csproj
/WPE.App.Authentication.Maui/WPE.App.Authentication.Maui.csproj-3+3
/WPE.App.Authentication.Maui/WPE.App.Authentication.Maui.csproj
Add comment 24 <PackageIcon>icon.png</PackageIcon>
Add comment 25 <PackageReadmeFile>ReadMe.md</PackageReadmeFile>
Add comment 26 <PackageTags>WPE;Workplace Experience;infsoft</PackageTags>
Add comment 27 Minus   <Version>0.3.3</Version>
Add comment 27 Plus   <Version>0.3.4</Version>
Add comment 28 <GenerateDocumentationFile>true</GenerateDocumentationFile>
Add comment 29 </PropertyGroup>
Add comment 30
Add comment 31 <ItemGroup>
Add comment 32 Minus   <PackageReference Include="Infsoft.WPE.App.Authentication.Base" Version="0.4.8" />
Add comment 32 Plus   <PackageReference Include="Infsoft.WPE.App.Authentication.Base" Version="0.4.12" />
Add comment 33 <PackageReference Include="Infsoft.WPE.App.DTO" Version="1.5.0" />
Add comment 34 <PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
Add comment 35 Minus   <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.6.0" />
Add comment 35 Plus   <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.6.1" />
Add comment 36 <PackageReference Include="Microsoft.Maui.Controls" Version="9.0.40" />
Add comment 37 <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.40" />
Add comment 38 </ItemGroup>