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

Allow using custom ObjectMapper for JWTParser #664

Open
5 tasks done
michael4screen opened this issue Jun 22, 2023 · 2 comments
Open
5 tasks done

Allow using custom ObjectMapper for JWTParser #664

michael4screen opened this issue Jun 22, 2023 · 2 comments
Labels
feature request A feature has been asked for or suggested by the community

Comments

@michael4screen
Copy link

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

I would like to use my custom ObjectMapper with the JWTParser.
I'm using kotlin and the default ObjectMapper is not equipped with the jackson kotlin module.
I see there is a constructor JWTParser(ObjecMapper objectmapper) but unfortunately its package private, so I have no possibility to use it.

Describe the ideal solution

Make the JWTParser(ObjecMapper objectmapper) constructor protected/public

Alternatives and current workarounds

As a current workaround I'm working with @JsonProperty annotations on my POJOs to make it work with the default ObjectMapper.

Additional context

No response

@michael4screen michael4screen added the feature request A feature has been asked for or suggested by the community label Jun 22, 2023
@michael4screen michael4screen changed the title Allow usage of ObjectMapper for JWTParser Allow using custom ObjectMapper for JWTParser Jun 22, 2023
@jimmyjames
Copy link
Contributor

👋 hi @michael4screen, thanks for the issue and info. Any chance you could provide a little sample to demonstrate the issue? The constructor is not public because we don't want to expose internal dependencies as part of the public API. Perhaps there's a different way we can help get this working for you without exposing the Jackson dependency as part of the public API.

@adam-gray
Copy link

Hi @jimmyjames, I'd like to be able to configure the ObjectMapper used in JWTParser to be able to use the Afterburner module for performance testing. Registering the module is a trivial change.

If a configurable ObjectMapper isn't in the cards, it might be worth adding the Afterburner module regardless. Let me know if I should open a new issue for that, as I don't want to take away from @michael4screen's need to reconfigure ObjectMapper for reasons other than performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

3 participants