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

feat(management): add DeviceCredentialsManager to mange device credentials #369

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Zarux
Copy link

@Zarux Zarux commented Mar 15, 2024

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

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

@Zarux
Copy link
Author

Zarux commented Apr 3, 2024

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

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.36%. Comparing base (769e738) to head (bf6756d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #369      +/-   ##
==========================================
+ Coverage   95.34%   95.36%   +0.02%     
==========================================
  Files          47       48       +1     
  Lines        7558     7598      +40     
==========================================
+ Hits         7206     7246      +40     
  Misses        235      235              
  Partials      117      117              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@developerkunal
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants