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

Add DeviceCredentialsManager to manage device credentials #369

Merged

Conversation

Zarux
Copy link
Contributor

@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
Contributor Author

Zarux commented Apr 3, 2024

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

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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              

☔ 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!

@JohnRoesler
Copy link

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

@developerkunal developerkunal requested a review from a team as a code owner November 6, 2024 08:39
Copy link
Contributor

@developerkunal developerkunal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@developerkunal
Copy link
Contributor

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 developerkunal force-pushed the feat/add-device-credentials-support branch from e5d61bb to f48f4fe Compare November 6, 2024 12:34
@developerkunal developerkunal changed the title feat(management): add DeviceCredentialsManager to mange device credentials Add DeviceCredentialsManager to manage device credentials Nov 6, 2024
@developerkunal developerkunal merged commit bfcb685 into auth0:main Nov 6, 2024
6 checks passed
@JohnRoesler
Copy link

thanks @developerkunal 👏

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.

5 participants