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 support for using Organizations with Client Grants #309

Merged
merged 5 commits into from
Nov 9, 2023

Conversation

ewanharris
Copy link
Contributor

🔧 Changes

Adds support for the functionality associated with Organizations and Client Grants

  • Passing an organization parameter when logging in with the Client Credentials grant
  • Retrieving organizations associated with a client grant
  • Associating and removing client grants with an organization, and retrieving client grants associated with an endpoint

📚 References

🔬 Testing

Covered by unit tests and tested manually

📝 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)

management/client_grant.go Outdated Show resolved Hide resolved
management/organization.go Outdated Show resolved Hide resolved
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
//
// See: https://auth0.com/docs/api/management/v2/organizations/post-client-grants
func (m *OrganizationManager) AssociateClientGrant(ctx context.Context, id string, grantID string, opts ...RequestOption) (err error) {
body := struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to reach out to see whether this body could change over time as that would impact whether we just accept a grantID (which would mean we can't really add to this in future) or the body (which would allow parameters to be added in future)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like this should be safe, also removed links for now as they'll 404. Will update in future

@ewanharris ewanharris merged commit 03f7feb into main Nov 9, 2023
7 checks passed
@ewanharris ewanharris deleted the feat/SDK-4547 branch November 9, 2023 13:57
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.

2 participants