-
Notifications
You must be signed in to change notification settings - Fork 6
Abstractions is now fully AoT compatible and durability ensured by a new AotTest #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
a05c21b
7ad093a
8e23fac
fd8e9f9
2d02895
444bf72
8cb600c
7c702e2
e755da8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| #if NET8_0_OR_GREATER | ||
| using System; | ||
| using System.Diagnostics.CodeAnalysis; | ||
| using System.Text.Json; | ||
| using System.Text.Json.Serialization; | ||
|
|
||
|
|
@@ -14,6 +15,8 @@ namespace Microsoft.Identity.Abstractions | |
| /// </summary> | ||
| /// <remarks>BE CAREFUL when you serialize a credential description. The secrets it contains | ||
| /// will be serialized too depending on the CredentialSource (ClientSecret, Base64Encoded, and Password)</remarks> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should expand the docs that for CustomSignedAssertionProviderData, JsonSerializerOptions.TypeInfoResolver can be used. |
||
| [RequiresDynamicCode("Uses JsonSerializer which may require dynamic code generation for certain types.")] | ||
| [RequiresUnreferencedCode("Uses JsonSerializer which may require dynamic code generation for certain types.")] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For DecryptKeysAuthenticationOptions, we could check if the options has a TypeInfoResolver, and if it doesn't then we could clone the options, and create a source generated context.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this effectively break the AOT linker ? |
||
| public class CredentialDescriptionJsonConverter : JsonConverter<CredentialDescription> | ||
| { | ||
| /// <inheritdoc/> | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||
| <Project Sdk="Microsoft.NET.Sdk"> | ||||
|
|
||||
| <PropertyGroup> | ||||
| <TargetFrameworks>net8.0;net9.0</TargetFrameworks> | ||||
| <ImplicitUsings>enable</ImplicitUsings> | ||||
| <Nullable>enable</Nullable> | ||||
|
|
||||
| <OutputType>exe</OutputType> | ||||
| <PublishAot>true</PublishAot> | ||||
| <StartupObject>Mise.Configuration.Aot.Tests.Program</StartupObject> | ||||
| <EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator> | ||||
| <!--<NoWarn>SYSLIB1100;SYSLIB1101;SYSLIB0026;SYSLIB0027;SYSLIB0028</NoWarn>--> | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| </PropertyGroup> | ||||
|
|
||||
| <ItemGroup> | ||||
| <Content Include="appsettings.json"> | ||||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
| </Content> | ||||
| </ItemGroup> | ||||
|
|
||||
|
|
||||
| <ItemGroup> | ||||
| <PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" /> | ||||
| <PackageReference Include="Microsoft.Extensions.Options" Version="9.0.4" /> | ||||
| </ItemGroup> | ||||
|
|
||||
|
|
||||
| <ItemGroup> | ||||
| <ProjectReference Include="..\..\src\Microsoft.Identity.Abstractions\Microsoft.Identity.Abstractions.csproj" /> | ||||
| </ItemGroup> | ||||
|
|
||||
|
|
||||
| </Project> | ||||
Uh oh!
There was an error while loading. Please reload this page.