auth0 / go-auth0

Go SDK for the Auth0 Management API.
https://auth0.com
MIT License
123 stars 54 forks source link

Add Organizations for Client Credentials #432

Closed duedares-rvj closed 2 weeks ago

duedares-rvj commented 1 month ago

πŸ”§ Changes

  1. Added new field calleddefault_organization to GET/PATCH endpoints /api/v2/clients/{id}
  2. Added new field calleddefault_organization to POST endpoints /api/v2/clients/
  3. Support query param q for GET /api/v2/clients
    • q=client_grant.organization_id:org_sampleorgid213
    • q=client_grant.allow_any_organization:true
  4. Support query param identifiers for GET /api/v2/organizations/{org_id}/client-grants
    • identifiers=https%3A%2F%2Fmy-api.example.com
  5. Support query param grant_ids for GET /api/v2/resource-servers
    • grant_ids=cgr_123456789012,cgr_abcdefghijkl

πŸ“š References

Required changes have been made in line with the documentation here Management API docs here

πŸ”¬ Testing

Relevant test cases and their recordings have been added to ensure changes as described above. All created resources are cleaned up after the assertions are completed.

make test FILTER=TestOrganizationManager_ClientGrantsWithOrg

πŸ“ Checklist

codecov-commenter commented 3 weeks ago

Codecov Report

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

Project coverage is 95.65%. Comparing base (e219463) to head (6c537e9). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #432 +/- ## ======================================= Coverage 95.64% 95.65% ======================================= Files 49 49 Lines 8158 8172 +14 ======================================= + Hits 7803 7817 +14 Misses 238 238 Partials 117 117 ```

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