Skip to content

Allow us to define additional middlewares #1167

@kr1x

Description

@kr1x

Checklist

  • I have looked into the Readme, Examples, and FAQ 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

We're in the process of implementing an own logic before and after sending requests to Auth0. The auth0 management client already offers the mechanism of middlewares, but we can't inject them when instantiating a new ManagementClient.

(The reason why we need to use an own middleware is, that we want to implement an own logic of rate-limiting per client to avoid global api limits)

Describe the ideal solution

Let us pass additional middlewares when instantiating the ManagementClient. And export the interfaces that we can use for pre and post functions (RequestContext, ResponseContext, etc.)

Alternatives and current workarounds

Creating an own copy of the ManagemetnClient, extending the ManagementClientBase and copy the TokenProvider because it's not exported from Auth0 SDK.

Additional context

No response

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