go-auth0 icon indicating copy to clipboard operation
go-auth0 copied to clipboard

feat(management): add DeviceCredentialsManager to mange device credentials

Open Zarux opened this issue 1 year ago • 3 comments

The management API is currently lacking support for the device-credentials endpoints. This PR adds the availabe methods for that endpoint.

https://auth0.com/docs/api/management/v2/device-credentials/get-device-credentials

🔧 Changes

Added support for Device Credentials in the management API with the methods: DeviceCredentials.Create DeviceCredentials.List DeviceCredentials.Delete

🔬 Testing

All new methods added have corresponding tests

📝 Checklist

  • [x] All new/changed/fixed functionality is covered by tests (or N/A)
  • [x] I have added documentation for all new/changed functionality (or N/A)

Zarux avatar Mar 15 '24 10:03 Zarux

@ewanharris Hi. Any chance you could review this when you have time?

Zarux avatar Apr 03 '24 07:04 Zarux

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.34%. Comparing base (89bcb9b) to head (f48f4fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #369      +/-   ##
==========================================
- Coverage   95.81%   95.34%   -0.47%     
==========================================
  Files          51       52       +1     
  Lines        8461    10339    +1878     
==========================================
+ Hits         8107     9858    +1751     
- Misses        236      363     +127     
  Partials      118      118              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 03 '24 06:05 codecov-commenter

Hey @Zarux ,

I hope you're doing well. As I was going through the PR, I wanted to share some thoughts with you. I've noticed a few areas where we could potentially improve, particularly in the test cases. Using getters throughout the codebase can offer some significant benefits, especially in GoLang. Additionally, incorporating random functions into our test details could greatly enhance the robustness of our testing framework. This approach ensures that even when we're dealing with multiple test cases, like creating or deleting tests, we're less likely to encounter errors along the way. If you'd like, you can check out this link for a reference: https://github.com/auth0/go-auth0/blob/main/management/connection_test.go

Let me know if you have any questions or need further clarification!

developerkunal avatar May 03 '24 12:05 developerkunal

hi @Zarux @developerkunal - I'd like to see this feature get merged in. Is it being worked?

JohnRoesler avatar Nov 05 '24 21:11 JohnRoesler

Hi @Zarux and @JohnRoesler, Apologies for the delayed response!

@Zarux, as per our branch restrictions, we are unable to merge the PR until the commits are signed. Could you please sign the commits so we can proceed with the merge?

developerkunal avatar Nov 06 '24 09:11 developerkunal

thanks @developerkunal 👏

JohnRoesler avatar Nov 06 '24 12:11 JohnRoesler