-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Update Wilson7 branch #49524
Update Wilson7 branch #49524
Conversation
Default to using new handlers Changes from API review
@@ -208,5 +209,5 @@ public TokenValidationParameters TokenValidationParameters | |||
/// <para>The default token handler for JsonWebTokens is a <see cref="JsonWebTokenHandler"/> which is faster than a <see cref="JwtSecurityTokenHandler"/>.</para> | |||
/// <para>There is an ability to make use of a Last-Known-Good model for metadata that protects applications when metadata is published with errors.</para> | |||
/// </remarks> | |||
public bool UseTokenHandlers { get; set; } | |||
public bool UseSecurityTokenHandlers { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: naming is slightly different than what was called out in API review because API review mistakenly used the name 'SecurityTokenValidators ' where for wsfed it is called 'SecurityTokenHandlers'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which are not the TokenHandler
unfortunately.
I wonder if, for the sake of simplicity and uniformity, we shouldn't keep UseSecurityTokenValidators even for WsFed ... just a suggestion.
Although looking at the code .. probably not.
} | ||
|
||
[Fact] | ||
public async Task ExpirationAndIssuedWhenMinOrMaxValue() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: behavior is slightly different than:
public async Task ExpirationAndIssuedNullWhenMinOrMaxValue() |
As JsonWebToken correctly handles datetimes represented by greater than int32 values
@@ -111,6 +113,7 @@ public new JwtBearerEvents Events | |||
/// <summary> | |||
/// Gets the ordered list of <see cref="ISecurityTokenValidator"/> used to validate access tokens. | |||
/// </summary> | |||
[Obsolete("SecurityTokenValidators is no longer used by default. Use TokenHandlers instead. To continue using SecurityTokenValidators, set UseSecurityTokenValidators to true.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to include an aka.ms link w/more details? @jmprieur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keegan-caruso @jennyf19
What about: https://aka.ms/aspnetcore8/security-token-changes
(already links to the breaking change announcement)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, @keegan-caruso
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @keegan-caruso
@@ -208,5 +209,5 @@ public TokenValidationParameters TokenValidationParameters | |||
/// <para>The default token handler for JsonWebTokens is a <see cref="JsonWebTokenHandler"/> which is faster than a <see cref="JwtSecurityTokenHandler"/>.</para> | |||
/// <para>There is an ability to make use of a Last-Known-Good model for metadata that protects applications when metadata is published with errors.</para> | |||
/// </remarks> | |||
public bool UseTokenHandlers { get; set; } | |||
public bool UseSecurityTokenHandlers { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which are not the TokenHandler
unfortunately.
I wonder if, for the sake of simplicity and uniformity, we shouldn't keep UseSecurityTokenValidators even for WsFed ... just a suggestion.
Although looking at the code .. probably not.
Merging this to the |
…49542) * Option to use JsonWebTokenHandler in OpenIdConnectHandler * fix sample * split event tests * update IdentityModel to 6.31.0 * Added JsonWebTokenHandler and TokenHandlers (#48857) Co-authored-by: Brent Schmaltz <brentsch@hotmail.com> * adjust for claims mapping remove using System * moved api's to unshipped * Addressed PR comments * Removed setter. * Use 7.0.0-preview for identity model libraries * fix bild break, useTokenHanlders default false. * use var for identitymodel versions * Move new apis to unshipped * Increase key size to 256 bits or HMAC will fail. * update version of identity model libraries (#49349) Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> * Update Wilson7 branch (#49491) * SymmetricSecurityKey needs 32 bytes * Update source-build-externals dependencies --------- Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> * Update Wilson7 branch (#49524) * Update Wilson7 branch Default to using new handlers Changes from API review * Handle obsolete members * Handle obsolete members in tests * Add aka.ms link --------- Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> * Changes from API review * Comments from review --------- Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> Co-authored-by: Brent Schmaltz <brentsch@hotmail.com> Co-authored-by: BrentSchmaltz <brentschmaltz@hotmail.com> Co-authored-by: Safia Abdalla <safia@microsoft.com>
…49541) * Option to use JsonWebTokenHandler in OpenIdConnectHandler * fix sample * split event tests * update IdentityModel to 6.31.0 * Added JsonWebTokenHandler and TokenHandlers (#48857) Co-authored-by: Brent Schmaltz <brentsch@hotmail.com> * adjust for claims mapping remove using System * moved api's to unshipped * Addressed PR comments * Removed setter. * Use 7.0.0-preview for identity model libraries * fix bild break, useTokenHanlders default false. * use var for identitymodel versions * Move new apis to unshipped * Increase key size to 256 bits or HMAC will fail. * update version of identity model libraries (#49349) Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> * Update Wilson7 branch (#49491) * SymmetricSecurityKey needs 32 bytes * Update source-build-externals dependencies --------- Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> * Update Wilson7 branch (#49524) * Update Wilson7 branch Default to using new handlers Changes from API review * Handle obsolete members * Handle obsolete members in tests * Add aka.ms link --------- Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> * Changes from API review * Comments from review --------- Co-authored-by: Keegan Caruso <keegancaruso@microsoft.com> Co-authored-by: Brent Schmaltz <brentsch@hotmail.com> Co-authored-by: BrentSchmaltz <brentschmaltz@hotmail.com> Co-authored-by: Safia Abdalla <safia@microsoft.com>
Update Wilson7 branch
Description
Default to using new handlers
Changes from API review