Skip to content

Make TokenProvider customizable #669

Open
@salbracco24

Description

@salbracco24

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 want to provide custom logic to retrieve the token used to access the Auth0 Management API. Yes, I can do this by calling "setApiToken()" but that's cumbersome. I would like to implement my own token provider by implementing TokenProvider, a public interface.

Describe the ideal solution

Add a method to the builder or add a constructor for the ManagementApi class (in the com.auth0.client.mgmt package), so that TokenProvider can be changed.

You can even just make the constructor on line 35 public, but I'd prefer a new constructor, as I don't need to specify the HTTP client.

You can literally fix this issue in 10 minutes or less.

Alternatives and current workarounds

No workarounds, except reflection, which is a hack.

Additional context

Please fix this quickly, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA feature has been asked for or suggested by the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions