auth0/auth0-java

MFA authentication policies endpoint support

pelletier197 opened this issue · 4 comments

Describe the problem you'd like to have solved

At the moment, the GuardianEntity does not seem to support everything the Auth0 Management API supports. In particular, I need to have access to the Put policies endpoint from the management API.

https://auth0.com/docs/api/management/v2#!/Guardian/put_policies

I don't believe it's implemented anywhere else in the library.

Describe the ideal solution

Ideally, this should be implemented as part of the guardian() method.

Alternatives and current work-arounds

I had to work around by using a custom WebClient at the moment, which forced me to add a new dependency.

Thank you!

Thanks for raising @pelletier197!

I'm not aware of any of specific reason the put_policies endpoint (or any other missing endpoint support) isn't implemented in this SDK, but maybe @lbalmaceda might know if there's a specific reason. If not, it's something we can add support for.

I believe it wasn't available at the time we added the Guardian entity. This can be added. @pelletier197 would you like to send a PR for us to review?

Yes, for sure, I can check to add that when I have some time available. I can start only with the endpoint I need, and if I have some free time, and can finish implementing the rest. How does that sound?

@pelletier197 the way we work with these types of PRs is by adding all the CRUD endpoints for a given entity at once.

In the case of the "policies" guardian entity, that would be just these endpoints:

If later on, you want to follow up with another PR adding more missing Guardian endpoints, that's more than welcome. But a PR with the 2 above is enough.

Thanks! Cheers