-
Notifications
You must be signed in to change notification settings - Fork 414
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
JsonWebTokenHandler to return the JsonWebToken on validation failure #1989
Conversation
…meters.IncludeTokenOnFailedValidation is set
bd4f5c7
to
624ba51
Compare
src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs
Outdated
Show resolved
Hide resolved
Consider adding documentation to PR or release notes detailing which TokenValidationParameter to set and how to retrieve the token on validation failiure. |
TokenValidationParameterTests and TokenValidationResultTests tests are failing. Please review the failures and update the tests. |
…meters.IncludeTokenOnFailedValidation is set
f704809
to
a339a5b
Compare
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!
build/version.props
Outdated
@@ -1,7 +1,7 @@ | |||
<!-- This file may be overwritten by automation. Only values allowed here are VersionPrefix and VersionSuffix. --> | |||
<Project> | |||
<PropertyGroup> | |||
<VersionPrefix>0.0.1</VersionPrefix> |
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.
@dannybtsai, did you accidentally check-in this file?
buildConfiguration.xml
Outdated
@@ -2,8 +2,8 @@ | |||
<dotnetArchitecture>x64</dotnetArchitecture> | |||
<nugetVersion>3.5.0-rc-1285</nugetVersion> | |||
<runtimes>net45,net461,netstandard2.0</runtimes> | |||
<assemblyVersion>6.25.2</assemblyVersion> | |||
<nugetSuffix>preview</nugetSuffix> |
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.
@dannybtsai, did you accidentally check-in this file?
build.ps1
Outdated
@@ -1,7 +1,7 @@ | |||
param( | |||
[string]$buildType="Debug", | |||
[string]$dotnetDir="c:\Program Files\dotnet", | |||
[string]$msbuildDir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin", |
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.
@dannybtsai, did you accidentally check-in this file?
@@ -22,8 +22,8 @@ public void Publics() | |||
TokenValidationParameters validationParameters = new TokenValidationParameters(); | |||
Type type = typeof(TokenValidationParameters); | |||
PropertyInfo[] properties = type.GetProperties(); | |||
if (properties.Length != 56) |
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.
Should we define a constant instead of hard-coding it?
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [System.IdentityModel.Tokens.Jwt](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) | nuget | minor | `6.25.1` -> `6.26.0` | --- ### Release Notes <details> <summary>AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet</summary> ### [`v6.26.0`](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases/tag/6.26.0) [Compare Source](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/6.25.1...6.26.0) Servicing release Introducing a new boolean TokenValidationParameter LogTokenId. [https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/2002](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/2002) Update System.Text.Encodings.Web [https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1997](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1997) Update ValidateToken call stack fully async [https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1996](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1996) JsonWebTokenHandler to return the JsonWebToken on validation failure [https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1989](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1989) Update documentation of DefaultTokenLifetimeInMinutes [https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1988](https://togithub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/1988) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,every weekend,before 5am every weekday" in timezone Europe/Berlin, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/orso-co/Orso.Arpa.Api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDkuMSIsInVwZGF0ZWRJblZlciI6IjM0LjEwOS4xIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
When a validation fails, the JsonWebTokenHandler should return the JsonWebToken so the caller can check the claims and log details if needed.