-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Improve deprecation for aud claims #630
Improve deprecation for aud claims #630
Conversation
78a3465
to
86e6a25
Compare
Seems like I have to enable signatures for my commits... will do ASAP, but it will take a while. Please review and give feedback. |
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: I don't think you actually need to add GPG signatures to commits.
Do we still have an issue here because of the commit signature requirement? |
f706bfc
to
695ec93
Compare
I force-pushed again with a GPG key attached. |
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.
@SvenRtbg thanks for sending your suggestions.
I'm hesitant to add the deprecation messages because v3 wasn't designed to use arrays on the audience claim. This worked by "accident" for your application (because of several issues on the lib).
Apart from that argument, adding deprecation messages in a patch release is a no-go for me and v3 series is in bug-fix mode only.
I can relate, however I think the 3.4 version is aimed at supporting the transition to 4.0. Before 3.4, I could easily use And I cannot really skip migrating this call in 3.4 because in 4.0 the previous method is deleted. And I also cannot really avoid calling So I would consider this change a backwards incompatible behaviour regarding |
What have been done in -Using arrays for audience claims is not really supported in 3.4 and will behave different in 4.0.
+Support to arrays for audience was mistakenly removed from 3.3 in 3.4. In 4.0 this will change again with more flexibility, please consult the documentation. And then I'd tag a new patch release for |
The discussion isn't about adherence but the fact that it has never been officially supported. It used to work by mistake, which was made clearer on v3.4. The official support only came in v4. So how can we label the fact that something used to work by mistake and now doesn't work anymore as a BC-break? |
I see you are referring to the There is no right answer: it was a mistake to not dynamically type-check the variables in the first place, as well as it is a user mistake to not use static analysis.
|
I do like @Slamdunk 's suggestion for the deprecation message better. Will change that. The comments regarding the upgrade file will also be considered. As has been said before, arrays used to work in 3.3, they stopped working in 3.4, and work again in 4.0. I had to figure out why my test cases failed after updating to the compatible 3.4 version, and I'd very much like to have something reassuring message that it isn't my code that is still broken during upgrades, but a use case that will be supported again. Thanks for your feedback. |
2e86f83
to
81ca419
Compare
@SvenRtbg @Slamdunk thank you very much for your patience and making me think.
This is a simple and yet very interesting sentence - and it made me reconsider the whole thing. Considering v3.4 as the bridge between the two versions, I've created a bridge with a missing plank. I took the deliberate decision of not backporting the support for multiple audiences and that was a wrong decision. It was wrong simply because the interface/behaviour isn't the same as v4. Making the old API behave as the new one requires a minor BC-break (claim replication, broken functionality which wasn't removed when introducing the new builder methods in v3.3 or so). I've created a patch to fix this issue (#656) and would like for us to move to that direction instead - even if we have to do a minor BC-break. Would you please review it and share your thoughts there? If we all agree with that solution, we can repurpose this PR to keep some of the improvements @SvenRtbg done on the docs and release it together with v3.4.4. Thank you again for your patience throughout the discussion and sorry for being attached to such petty details - sometimes I get stuck in useless peculiarities. |
bc510e6
to
e40b13f
Compare
I like deprecation messages, so I added them to the Regarding "too far": I have the feeling that I'd probably have to deal with internal calls to methods triggering deprecation notices in order to get rid of them, otherwise one would not be able to upgrade a code base to be free of them. I intentionally left the upgrade document in a separate commit, to be able to cherrypick it. Let me know what you think. |
The library still exposes an asymmetric behavior when dealing with audience arrays and using the deprecated methods, as described in my PR now. So without an update to the new Token API, there will be errors appearing in edge cases. But I think the world can live with that regardless. I'm not sure I added this fact into the |
My (implicit) policy is to only add the deprecation messages for things that can't be converted with With that said, let's please only add the messages when using arrays on
I reaaaaaaaaally appreciate your commit organisation ❤️ |
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.
Just some feedback on the docs :)
e40b13f
to
ae55565
Compare
ae55565
to
24b6b64
Compare
I think we are good now: Improved upgrade guide, and the offending issue has a dedicated deprecation message with test case. |
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.
That's perfect. Thanks a lot for your help @SvenRtbg!
@SvenRtbg all released! I'll do some manual merge-ups since the release automation failed due to branch naming and all. Thanks again! |
Addresses some concerns in #629.