Add ClaimData for AuthenticationStateData and fix overtrimming#56878
Merged
Add ClaimData for AuthenticationStateData and fix overtrimming#56878
Conversation
- Addresses API review feedback from #52769
halter73
commented
Jul 18, 2024
| namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; | ||
|
|
||
| // REVIEW: Should this be merged into BasicTestAppServerSiteFixture? Is there any case where we wouldn't | ||
| // want to trim BasicTestAppServerSiteFixture tests when TestTrimmedOrMultithreadingApps is true? |
Member
Author
There was a problem hiding this comment.
@dotnet/aspnet-blazor-eng I'm curious what everyone thinks about this.
Member
There was a problem hiding this comment.
I would say that if other tests don't break, we could enable it, but I suspect we wanted to have this isolated. I believe in the past we would test all the apps with trimming during release. I don't know if/when that changed, but I'm ok if we bring that back.
halter73
commented
Jul 18, 2024
amcasey
approved these changes
Jul 18, 2024
Member
amcasey
left a comment
There was a problem hiding this comment.
Product change LGTM. I'll let the stakeholders figure out the test infra changes.
javiercn
approved these changes
Jul 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a follow up to #55821 which added the
AuthenticationStateProviderimplementations from the .NET 8 Blazor web project templates to the runtime. You can opt into using these by adding the new services as follows.These services rely on JSON serializing and deserializing the newly added
AuthenticationStateDatatype which previously contained aClaimsproperty of typeIList<KeyValuePair<string, string>>. After API review feedback in #52769, we've decided to updateAuthenticationStateData.Claimsto be anIList<ClaimData>.This PR also fixes #56207 which was caused by the overtrimming
AuthenticationStateData.Claimsand updates theServerRenderedAuthenticationStateTestandDefaultAuthenticationStateSerializationOptionsTestto test published trimmed WebAssembly static assets.As part of this, I refactored the common logic of most tests that currently use static assets published to the "trimmed-or-threading" to use the new
TrimmingServerFixture. However, I wonder if we should go further and makeBasicTestAppServerSiteFixtureuse trimmed static assets by default whenTestTrimmedOrMultithreadingAppsis configured.Fixes #52769
Fixes #56207