Skip to content
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

feat: Improve error messages for JWT validation. #2046

Merged

Conversation

amanda-tarafa
Copy link
Contributor

In particular when certificates in a format other than JWK are used.
Closes #2045

@amanda-tarafa amanda-tarafa requested a review from jskeet February 8, 2022 12:21
@amanda-tarafa amanda-tarafa requested a review from a team as a code owner February 8, 2022 12:21
@amanda-tarafa amanda-tarafa self-assigned this Feb 8, 2022
cachedCerts = new CachedCertificates(
JToken.Parse(certificatesJson)["keys"]
.AsEnumerable()
jwks
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unwrap the line below into this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done, everything fit neetly in one line now. I'll push again and merge on green. Thanks!

In particular when certificates in a format other than JWK are used.
Closes googleapis#2045
@amanda-tarafa amanda-tarafa force-pushed the token-validation-error branch from aec6c78 to e4221cf Compare February 8, 2022 14:01
@amanda-tarafa amanda-tarafa merged commit 02f1333 into googleapis:main Feb 8, 2022
@amanda-tarafa amanda-tarafa deleted the token-validation-error branch February 8, 2022 14:09
amanda-tarafa added a commit to amanda-tarafa/google-api-dotnet-client that referenced this pull request Feb 18, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bug fixes:
- googleapis#1991. Disables self signed JWTs for domain-wide delegation.
- googleapis#2023. Observes execeptions in refresh token tasks.
Features:
- googleapis#2037. Adds GoogleCredential.FromJsonParameters.
- googleapis#2046. Improves error messages for JWT validation.
Docs:
- googleapis#2044. Adds links to OAuth2 docs in FAQs.
amanda-tarafa added a commit that referenced this pull request Feb 18, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bug fixes:
- #1991. Disables self signed JWTs for domain-wide delegation.
- #2023. Observes execeptions in refresh token tasks.
Features:
- #2037. Adds GoogleCredential.FromJsonParameters.
- #2046. Improves error messages for JWT validation.
Docs:
- #2044. Adds links to OAuth2 docs in FAQs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal Error Validating Authorization Token from ChatBot
2 participants