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

Unable to set token_endpoint_auth_method to null #642

Open
5 tasks done
ina-schaal opened this issue May 6, 2024 · 0 comments
Open
5 tasks done

Unable to set token_endpoint_auth_method to null #642

ina-schaal opened this issue May 6, 2024 · 0 comments
Labels
bug This points to a verified bug in the code

Comments

@ina-schaal
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.

Description

I want to configure my application to use private key authentication in "client_authentication_methods". For this I need to set "token_endpoint_auth_method" to null, however the SDK does not allow for null values to be set due to @JsonInclude(Include.NON_NULL) on src/main/java/com/auth0/json/mgmt/client/Client.java.
I agree that omitting fields if they are null is ok for most fields, however in this case it prevents clients from switching to the private key authentication method.
As a suggestion, maybe adding another allowed value to token_endpoint_auth_method (apart from 'none', client_secret_post', 'client_secret_basic') to represent "null" would work.

Reproduction

  1. Have a Machine to Machine client with client secret (token_endpoint_auth_method=client_secret_post)
  2. Create a credential
  3. Add the credential to the client via the SDK, using the update client method, while setting token_endpoint_auth_method=null
  4. Observe error message: "token_endpoint_auth_method must be disabled (set to null) when migrating to client_authentication_methods."

Additional context

No response

auth0-java version

2.10.1

Java version

17.0.9 (Amazon Corretto)

@ina-schaal ina-schaal added the bug This points to a verified bug in the code label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant