-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Restore two JWT decoding methods in OidcUtils #45949
base: main
Are you sure you want to change the base?
Restore two JWT decoding methods in OidcUtils #45949
Conversation
Guillaume, if you think having them in |
We should probably keep them at the OidcUtils level for now since all this method does it used a StringTokenizer to split the parts and use Base64.urlDecoder to decode it and get JsonObject, just a few lines of code really |
Status for workflow
|
adding methods we don't use without deprecations doesn't make sense to me; so we will have these unused methods there forever? |
I don't think it makes sense to discuss this much, code duplication is fine, I just wanted to mention I don't think this argument is sound. I thought all the methods I moved was because I needed them at places that doesn't have dependency on OIDC utils, so why to duplicate it. If you prefer to have it in OIDC utils, no problem from my side. |
I just read #45948 (comment) and it says I've moved over to the com.auth0:java-jwt package for decoding the token as its actually better and what I would use anyway. Is this PR going to help the user? |
Anyway, I apologize for the volume of comments, especially as I don't mind if this gets in. I just could not help thinking that this is not well argued. |
Hi @michalvavrik, np at all, I don't really mind much myself, FYI, this PR does not duplicate the code, only makes some of those users who may have found this rather handy, even if simple, utility method useful, not to change their code. By the way, I think comparing what this method does to some libraries makes no sense IMHO, I'd rather type a few lines of code myself then bringing a lib to split a string by In any case, I think I may have suggested a few users over the years to use it, sometimes they need to preprocess the token in filters... May be we can have |
Thanks Sergey, just in short:
That is valid argument. But I think we need to mark it somewhere. TBH I have removed at least one method that delegated to the common utils exactly like these and normally I'd do it again. Hopefully I'll remember this.
I think that sounds good. |
Fixes #45948.
Adding a couple of methods related to decoding JWT back to OidcUtils, it is not a big problem to have them in OidcUtils and delegating to OidcCommonUtils