question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The "cty" header is always added breaking compatibility with certain services

See original GitHub issue

Which version of Microsoft.IdentityModel are you using? 6.18

Where is the issue?

  • M.IM.JsonWebTokens

Is this a new or an existing app? The app is in production and I have upgraded to a new version of Microsoft.IdentityModel.

Expected behavior The cty header addition for JsonWebTokenHandler.CreateToken is controlled by some flag.

Actual behavior The cty header is added unconditionally.

Possible solution Since #1588, there seems to be no way to control the addition of the cty header, and there are services (for example Apple ID token service) that require the produced token to contain only specified headers. The header set works just fine in the versions up to and including 6.17. After #1588 was completed, there appears to be no way to control the cty header presence.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
brentschmaltzcommented, Jun 7, 2022

@RojaEnnam make sure to address ^^ @onyxmaster we should apologize, after all these years we know changing a wire format needs a back-compat switch.

1reaction
jennyf19commented, Jun 21, 2022

Released in 6.20.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CTY header is not set for JWE · Issue #1295
employed, this Header Parameter MUST be present; in this case, the ... The "cty" header is always added breaking compatibility with certain services...
Read more >
Adding Header in REST API breaks backward compatibility
I want to read two more headers - addToCache and useCache . The obvious solution is to add the headers in the above...
Read more >
RFC 7519 - JSON Web Token (JWT)
Introduction JSON Web Token (JWT) is a compact claims representation format intended for space constrained environments such as HTTP Authorization headers ...
Read more >
Web API design best practices - Azure Architecture Center
Learn the best practices for designing web APIs that support platform independence and service evolution.
Read more >
Americans with Disabilities Act Title II Regulations | ADA.gov
Title II of the ADA - regulations for state and local governments meant to ensure that people with disabilities can participate in all ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found