auth0 6.0.0.beta.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +1 -1
- data/.fern/replay.lock +7 -1
- data/.version +1 -1
- data/CHANGELOG.md +57 -0
- data/README.md +4 -1
- data/custom.gemspec.rb +1 -1
- data/examples/ruby-api/Gemfile.lock +3 -3
- data/lib/auth0/agents/client.rb +201 -0
- data/lib/auth0/agents/types/create_agent_request_content.rb +17 -0
- data/lib/auth0/agents/types/list_agents_request_parameters.rb +13 -0
- data/lib/auth0/agents/types/patch_agent_request_parameters.rb +15 -0
- data/lib/auth0/client.rb +5 -0
- data/lib/auth0/client_grants/client.rb +2 -0
- data/lib/auth0/client_grants/organizations/client.rb +2 -0
- data/lib/auth0/client_grants/organizations/types/list_client_grant_organizations_request_parameters.rb +2 -0
- data/lib/auth0/client_grants/types/list_client_grants_request_parameters.rb +2 -0
- data/lib/auth0/connections/client.rb +2 -0
- data/lib/auth0/connections/directory_provisioning/client.rb +76 -0
- data/lib/auth0/connections/directory_provisioning/types/add_synchronized_groups_request_content.rb +15 -0
- data/lib/auth0/connections/directory_provisioning/types/delete_synchronized_groups_request_content.rb +15 -0
- data/lib/auth0/connections/directory_provisioning/types/list_synchronized_groups_request_parameters.rb +2 -0
- data/lib/auth0/connections/types/list_connections_query_parameters.rb +2 -0
- data/lib/auth0/event_streams/deliveries/client.rb +27 -17
- data/lib/auth0/flows/executions/client.rb +2 -0
- data/lib/auth0/flows/executions/types/list_flow_executions_request_parameters.rb +2 -0
- data/lib/auth0/groups/client.rb +2 -0
- data/lib/auth0/groups/types/list_groups_request_parameters.rb +2 -0
- data/lib/auth0/mixins/token_management.rb +15 -11
- data/lib/auth0/organizations/client.rb +9 -0
- data/lib/auth0/organizations/clients/client.rb +223 -0
- data/lib/auth0/organizations/clients/types/create_organization_clients_request_content.rb +15 -0
- data/lib/auth0/organizations/clients/types/delete_organization_clients_request_content.rb +15 -0
- data/lib/auth0/organizations/clients/types/list_organization_clients_request_parameters.rb +17 -0
- data/lib/auth0/organizations/clients/types/update_organization_client_request_content.rb +17 -0
- data/lib/auth0/organizations/members/client.rb +5 -1
- data/lib/auth0/organizations/members/roles/client.rb +3 -0
- data/lib/auth0/organizations/members/types/list_organization_members_request_parameters.rb +2 -0
- data/lib/auth0/organizations/roles/client.rb +5 -0
- data/lib/auth0/organizations/roles/groups/client.rb +68 -0
- data/lib/auth0/organizations/roles/groups/types/list_organization_role_groups_request_parameters.rb +21 -0
- data/lib/auth0/organizations/roles/members/client.rb +6 -0
- data/lib/auth0/organizations/types/create_organization_request_content.rb +2 -0
- data/lib/auth0/organizations/types/list_organizations_request_parameters.rb +4 -0
- data/lib/auth0/organizations/types/update_organization_request_content.rb +2 -0
- data/lib/auth0/roles/client.rb +4 -0
- data/lib/auth0/roles/types/create_role_request_content.rb +4 -0
- data/lib/auth0/roles/types/list_roles_request_parameters.rb +4 -0
- data/lib/auth0/roles/users/client.rb +5 -0
- data/lib/auth0/roles/users/types/list_role_users_request_parameters.rb +2 -0
- data/lib/auth0/types/acul_context_enum.rb +1 -0
- data/lib/auth0/types/agent_metadata.rb +23 -0
- data/lib/auth0/types/agent_response_content.rb +19 -0
- data/lib/auth0/types/conflict_schema.rb +14 -0
- data/lib/auth0/types/conflict_schema_error.rb +11 -0
- data/lib/auth0/types/connection_connected_accounts_purpose.rb +2 -0
- data/lib/auth0/types/connection_connected_accounts_purpose_xaa.rb +2 -0
- data/lib/auth0/types/create_organization_client_request_item.rb +11 -0
- data/lib/auth0/types/create_organization_clients_response_content.rb +23 -0
- data/lib/auth0/types/create_organization_response_content.rb +4 -0
- data/lib/auth0/types/create_role_response_content.rb +4 -0
- data/lib/auth0/types/event_stream_cloud_event.rb +1 -1
- data/lib/auth0/types/event_stream_cloud_event_data.rb +23 -0
- data/lib/auth0/types/event_stream_delivery_attempt.rb +2 -0
- data/lib/auth0/types/get_organization_by_name_response_content.rb +4 -0
- data/lib/auth0/types/get_organization_client_response_content.rb +13 -0
- data/lib/auth0/types/get_organization_response_content.rb +4 -0
- data/lib/auth0/types/get_role_response_content.rb +4 -0
- data/lib/auth0/types/guardian_factor.rb +2 -0
- data/lib/auth0/types/guardian_factor_settings.rb +12 -0
- data/lib/auth0/types/list_agents_response_content.rb +11 -0
- data/lib/auth0/types/list_event_stream_deliveries_response_content.rb +11 -0
- data/lib/auth0/types/list_organization_clients_response_content.rb +11 -0
- data/lib/auth0/types/list_organization_role_groups_response_content.rb +12 -0
- data/lib/auth0/types/not_found_schema.rb +14 -0
- data/lib/auth0/types/not_found_schema_error.rb +11 -0
- data/lib/auth0/types/oauth_scope.rb +8 -0
- data/lib/auth0/types/organization.rb +4 -0
- data/lib/auth0/types/organization_client.rb +13 -0
- data/lib/auth0/types/organization_client_association.rb +11 -0
- data/lib/auth0/types/organization_client_metadata.rb +20 -0
- data/lib/auth0/types/organization_client_metadata_organization_usage_enum.rb +13 -0
- data/lib/auth0/types/role.rb +4 -0
- data/lib/auth0/types/role_group.rb +26 -0
- data/lib/auth0/types/role_type_enum.rb +12 -0
- data/lib/auth0/types/self_service_profile_sso_ticket_google_workspace_config.rb +2 -0
- data/lib/auth0/types/synchronized_group_payload.rb +6 -0
- data/lib/auth0/types/synchronized_group_selection_id.rb +9 -0
- data/lib/auth0/types/update_organization_client_response_content.rb +13 -0
- data/lib/auth0/types/update_organization_response_content.rb +4 -0
- data/lib/auth0/types/update_role_response_content.rb +4 -0
- data/lib/auth0/types/user_effective_permission_role_source_response_content.rb +4 -0
- data/lib/auth0/users/groups/client.rb +2 -0
- data/lib/auth0/users/groups/types/get_user_groups_request_parameters.rb +2 -0
- data/lib/auth0/users/permissions/client.rb +3 -0
- data/lib/auth0/users/refresh_token/client.rb +2 -0
- data/lib/auth0/users/refresh_token/types/list_refresh_tokens_request_parameters.rb +2 -0
- data/lib/auth0/users/roles/client.rb +3 -0
- data/lib/auth0/users/sessions/client.rb +2 -0
- data/lib/auth0/users/sessions/types/list_user_sessions_request_parameters.rb +2 -0
- data/lib/auth0/version.rb +1 -1
- data/lib/auth0.rb +38 -2
- data/v6_MIGRATION_GUIDE.md +1 -1
- data/wiremock/wiremock-mappings.json +592 -55
- metadata +46 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df791871e5e429a838ffc5bd466babec6f9c998b8890eabdf82896a8b206907d
|
|
4
|
+
data.tar.gz: 34922d0bb83c686b5df110b27b0ceebfaf05c2ffa6bcd5ab82fa17cb1d9c7aca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74257b18bceea1194961364c4a094e08e131b0b848054dcaf1d341208a123f8aaca9f087898094713da48461567c7dbe80567cb6621fd230b20908509b2fcbe3
|
|
7
|
+
data.tar.gz: ad85519634ab16fcb8e3757689cf454a003b9a6c1c6319cdeabc21e4f46de77435714b0fe67499cd328da2e2504f04b7e5326991d5ac8bd711fbb7b101b8295b
|
data/.fern/metadata.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"offsetSemantics": "page-index",
|
|
11
11
|
"useDefaultRequestParameterValues": true
|
|
12
12
|
},
|
|
13
|
-
"originGitCommit": "
|
|
13
|
+
"originGitCommit": "8857b12c5a5345e87088f8d57ba9cffdb82ed9fe",
|
|
14
14
|
"originGitCommitIsDirty": false,
|
|
15
15
|
"invokedBy": "ci",
|
|
16
16
|
"ciProvider": "github",
|
data/.fern/replay.lock
CHANGED
|
@@ -24,5 +24,11 @@ generations:
|
|
|
24
24
|
cli_version: unknown
|
|
25
25
|
generator_versions:
|
|
26
26
|
fernapi/fern-ruby-sdk: 1.17.8
|
|
27
|
-
|
|
27
|
+
- commit_sha: ff82f16a518e8ee51b23570ed1a303f3c070ff02
|
|
28
|
+
tree_hash: 6b4ba82c8dbe3556b6c8e7dd4f7c4d32671aa12a
|
|
29
|
+
timestamp: 2026-08-04T06:22:44.311Z
|
|
30
|
+
cli_version: unknown
|
|
31
|
+
generator_versions:
|
|
32
|
+
fernapi/fern-ruby-sdk: 1.17.8
|
|
33
|
+
current_generation: ff82f16a518e8ee51b23570ed1a303f3c070ff02
|
|
28
34
|
patches: []
|
data/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v6.0.0
|
|
1
|
+
v6.0.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v6.0.0](https://github.com/auth0/ruby-auth0/tree/v6.0.0) (2026-08-13)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.20.0...v6.0.0)
|
|
5
|
+
|
|
6
|
+
Note: As this is a major release it is recommended to understand the **Breaking Changes** section before upgrading. The [v6 Migration Guide](v6_MIGRATION_GUIDE.md) contains detailed upgrade instructions.
|
|
7
|
+
|
|
8
|
+
v6.0.0 is the first stable release of the v6 line. The Management API client is now generated from Auth0's OpenAPI specification via [Fern](https://buildwithfern.com/), with strongly-typed requests and responses, built-in pagination, and automatic token management through the unified `Auth0::Client`. The Authentication API is ported from v5 and maintains full feature parity.
|
|
9
|
+
|
|
10
|
+
**Breaking Changes**
|
|
11
|
+
- Management API client rewritten using Fern code generation
|
|
12
|
+
- `Auth0Client` replaced by `Auth0::Client` (unified client for Authentication + Management APIs; `Auth0Client` remains as a backward-compatible alias)
|
|
13
|
+
- Management API methods accessed via namespaced sub-clients (`client.users.list` instead of `client.users`)
|
|
14
|
+
- Method names follow a consistent pattern (`list`, `create`, `get`, `update`, `delete`), and sub-resource operations moved to dedicated sub-clients
|
|
15
|
+
- All Management API methods use keyword arguments instead of positional parameters
|
|
16
|
+
- API methods return strongly-typed response objects instead of raw hashes
|
|
17
|
+
- List methods return paginated iterators instead of arrays
|
|
18
|
+
- Non-2xx responses raise typed exceptions (`Auth0::Errors::NotFoundError`, etc.) instead of returning error hashes
|
|
19
|
+
- The `api_version` parameter has been removed (v6 supports Management API v2 only)
|
|
20
|
+
- `rest-client` dependency removed; uses `net/http` internally
|
|
21
|
+
- Minimum Ruby version raised to 3.3
|
|
22
|
+
|
|
23
|
+
**Added**
|
|
24
|
+
- Auto-generated Management API with complete endpoint coverage from Auth0's OpenAPI spec
|
|
25
|
+
- Automatic OAuth 2.0 client credentials token management, with a new `token_provider` option for supplying tokens from an external source
|
|
26
|
+
- Built-in retry with exponential backoff for transient failures (408, 429, 5xx)
|
|
27
|
+
- Automatic pagination through iterator objects for all list endpoints
|
|
28
|
+
- `v6_MIGRATION_GUIDE.md` for upgrading from v5
|
|
29
|
+
|
|
30
|
+
**Unchanged**
|
|
31
|
+
- Authentication API (login, signup, token exchange, passwordless, MFA)
|
|
32
|
+
|
|
33
|
+
## [v6.0.0.beta.5](https://github.com/auth0/ruby-auth0/tree/v6.0.0.beta.5) (2026-08-05)
|
|
34
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.0.0.beta.4...v6.0.0.beta.5)
|
|
35
|
+
|
|
36
|
+
**Added**
|
|
37
|
+
- feat: add Agents and Organization Clients clients, Organization Level Roles, and Org-to-App Entitlement [\#777](https://github.com/auth0/ruby-auth0/pull/777) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
38
|
+
|
|
3
39
|
## [v6.0.0.beta.4](https://github.com/auth0/ruby-auth0/tree/v6.0.0.beta.4) (2026-07-22)
|
|
4
40
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.0.0.beta.3...v6.0.0.beta.4)
|
|
5
41
|
|
|
@@ -26,6 +62,18 @@
|
|
|
26
62
|
**Added**
|
|
27
63
|
- feat: add Tenant Security Headers and Connection Session Expiry; remove Branding Phone Display [\#751](https://github.com/auth0/ruby-auth0/pull/751) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
28
64
|
|
|
65
|
+
## [v5.20.0](https://github.com/auth0/ruby-auth0/tree/v5.20.0) (2026-05-29)
|
|
66
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.19.0...v5.20.0)
|
|
67
|
+
|
|
68
|
+
**Changed**
|
|
69
|
+
- Support jwt gem 3.x alongside 2.x [\#726](https://github.com/auth0/ruby-auth0/pull/726) ([dan98765](https://github.com/dan98765))
|
|
70
|
+
|
|
71
|
+
**Fixed**
|
|
72
|
+
- Fix YARD comment with extra space [\#637](https://github.com/auth0/ruby-auth0/pull/637) ([qtro](https://github.com/qtro))
|
|
73
|
+
|
|
74
|
+
**Security**
|
|
75
|
+
- chore(deps): bump jwt from 3.1.2 to 3.2.0 [\#745](https://github.com/auth0/ruby-auth0/pull/745) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
76
|
+
|
|
29
77
|
## [v6.0.0.beta.1](https://github.com/auth0/ruby-auth0/tree/v6.0.0.beta.1) (2026-05-28)
|
|
30
78
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v6.0.0.beta.0...v6.0.0.beta.1)
|
|
31
79
|
|
|
@@ -33,6 +81,15 @@
|
|
|
33
81
|
- feat: Events API, Rate Limit Policies, refresh token revocation, FedCM, DPoP GA [\#732](https://github.com/auth0/ruby-auth0/pull/732) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
34
82
|
- feat: add SCIM Groups RBAC, User Effective Permissions/Roles, and Tenant Country Codes [\#742](https://github.com/auth0/ruby-auth0/pull/742) ([fern-api[bot]](https://github.com/apps/fern-api))
|
|
35
83
|
|
|
84
|
+
## [v5.19.0](https://github.com/auth0/ruby-auth0/tree/v5.19.0) (2026-05-08)
|
|
85
|
+
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.18.1...v5.19.0)
|
|
86
|
+
|
|
87
|
+
**Added**
|
|
88
|
+
- Make Auth0::Client#get_token public [\#725](https://github.com/auth0/ruby-auth0/pull/725) ([ttstarck](https://github.com/ttstarck))
|
|
89
|
+
|
|
90
|
+
**Fixed**
|
|
91
|
+
- Ship only runtime files in packaged gem to eliminate scanner false positives [\#721](https://github.com/auth0/ruby-auth0/pull/721) ([tmertens](https://github.com/tmertens))
|
|
92
|
+
|
|
36
93
|
## 6.0.0-beta.0 (2026-04-30)
|
|
37
94
|
|
|
38
95
|
[Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.18.1...v6.0.0.beta.0)
|
data/README.md
CHANGED
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
Ruby API client for the [Auth0](https://auth0.com) platform.
|
|
4
4
|
|
|
5
5
|
[](http://badge.fury.io/rb/auth0)
|
|
6
|
+
[](https://codecov.io/gh/auth0/ruby-auth0)
|
|
7
|
+
[](https://www.rubydoc.info/gems/auth0)
|
|
6
8
|
[](https://github.com/auth0/ruby-auth0/blob/master/LICENSE)
|
|
9
|
+
[](https://deepwiki.com/auth0/ruby-auth0)
|
|
7
10
|
|
|
8
11
|
<div>
|
|
9
|
-
|
|
12
|
+
📚 <a href="#documentation">Documentation</a> - 🚀 <a href="#getting-started">Getting started</a> - 💻 <a href="#api-reference">API reference</a> - 💬 <a href="#feedback">Feedback</a>
|
|
10
13
|
</div>
|
|
11
14
|
|
|
12
15
|
## Documentation
|
data/custom.gemspec.rb
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
def add_custom_gemspec_data(spec)
|
|
10
10
|
spec.add_dependency "rest-client", "~> 2.1"
|
|
11
|
-
spec.add_dependency "jwt", "
|
|
11
|
+
spec.add_dependency "jwt", ">= 2.7", "< 4.0"
|
|
12
12
|
spec.add_dependency "zache", "~> 0.12"
|
|
13
13
|
spec.add_dependency "addressable", "~> 2.8"
|
|
14
14
|
spec.add_dependency "retryable", "~> 3.0"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ../..
|
|
3
3
|
specs:
|
|
4
|
-
auth0 (
|
|
4
|
+
auth0 (6.0.0)
|
|
5
5
|
addressable (~> 2.8)
|
|
6
|
-
jwt (
|
|
6
|
+
jwt (>= 2.7, < 4.0)
|
|
7
7
|
rest-client (~> 2.1)
|
|
8
8
|
retryable (~> 3.0)
|
|
9
9
|
zache (~> 0.12)
|
|
@@ -19,7 +19,7 @@ GEM
|
|
|
19
19
|
http-accept (1.7.0)
|
|
20
20
|
http-cookie (1.1.6)
|
|
21
21
|
domain_name (~> 0.5)
|
|
22
|
-
jwt (2.10.
|
|
22
|
+
jwt (2.10.3)
|
|
23
23
|
base64
|
|
24
24
|
logger (1.7.0)
|
|
25
25
|
mime-types (3.7.0)
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Agents
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Auth0::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Get agents
|
|
14
|
+
#
|
|
15
|
+
# @param request_options [Hash]
|
|
16
|
+
# @param params [Hash]
|
|
17
|
+
# @option request_options [String] :base_url
|
|
18
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
19
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
20
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
21
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
22
|
+
# @option params [String, nil] :from
|
|
23
|
+
# @option params [Integer, nil] :take
|
|
24
|
+
#
|
|
25
|
+
# @return [Auth0::Types::ListAgentsResponseContent]
|
|
26
|
+
def list(request_options: {}, **params)
|
|
27
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
28
|
+
query_params = {}
|
|
29
|
+
query_params["from"] = params[:from] if params.key?(:from)
|
|
30
|
+
query_params["take"] = params.fetch(:take, 50)
|
|
31
|
+
|
|
32
|
+
Auth0::Internal::CursorItemIterator.new(
|
|
33
|
+
cursor_field: :next_,
|
|
34
|
+
item_field: :agents,
|
|
35
|
+
initial_cursor: query_params["from"]
|
|
36
|
+
) do |next_cursor|
|
|
37
|
+
query_params["from"] = next_cursor
|
|
38
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
39
|
+
base_url: request_options[:base_url],
|
|
40
|
+
method: "GET",
|
|
41
|
+
path: "agents",
|
|
42
|
+
query: query_params,
|
|
43
|
+
request_options: request_options
|
|
44
|
+
)
|
|
45
|
+
begin
|
|
46
|
+
response = @client.send(request)
|
|
47
|
+
rescue Net::HTTPRequestTimeout
|
|
48
|
+
raise Auth0::Errors::TimeoutError
|
|
49
|
+
end
|
|
50
|
+
code = response.code.to_i
|
|
51
|
+
if code.between?(200, 299)
|
|
52
|
+
parsed_response = Auth0::Types::ListAgentsResponseContent.load(response.body)
|
|
53
|
+
[parsed_response, response]
|
|
54
|
+
else
|
|
55
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
56
|
+
raise error_class.new(response.body, code: code)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Create an agent
|
|
62
|
+
#
|
|
63
|
+
# @param request_options [Hash]
|
|
64
|
+
# @param params [Auth0::Agents::Types::CreateAgentRequestContent]
|
|
65
|
+
# @option request_options [String] :base_url
|
|
66
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
67
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
68
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
69
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
70
|
+
#
|
|
71
|
+
# @return [Auth0::Types::AgentResponseContent]
|
|
72
|
+
def create(request_options: {}, **params)
|
|
73
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
74
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
75
|
+
base_url: request_options[:base_url],
|
|
76
|
+
method: "POST",
|
|
77
|
+
path: "agents",
|
|
78
|
+
body: Auth0::Agents::Types::CreateAgentRequestContent.new(params).to_h,
|
|
79
|
+
request_options: request_options
|
|
80
|
+
)
|
|
81
|
+
begin
|
|
82
|
+
response = @client.send(request)
|
|
83
|
+
rescue Net::HTTPRequestTimeout
|
|
84
|
+
raise Auth0::Errors::TimeoutError
|
|
85
|
+
end
|
|
86
|
+
code = response.code.to_i
|
|
87
|
+
if code.between?(200, 299)
|
|
88
|
+
Auth0::Types::AgentResponseContent.load(response.body)
|
|
89
|
+
else
|
|
90
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
91
|
+
raise error_class.new(response.body, code: code)
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Get an agent
|
|
96
|
+
#
|
|
97
|
+
# @param request_options [Hash]
|
|
98
|
+
# @param params [Hash]
|
|
99
|
+
# @option request_options [String] :base_url
|
|
100
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
101
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
102
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
103
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
104
|
+
# @option params [String] :id
|
|
105
|
+
#
|
|
106
|
+
# @return [Auth0::Types::AgentResponseContent]
|
|
107
|
+
def read(request_options: {}, **params)
|
|
108
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
109
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
110
|
+
base_url: request_options[:base_url],
|
|
111
|
+
method: "GET",
|
|
112
|
+
path: "agents/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
113
|
+
request_options: request_options
|
|
114
|
+
)
|
|
115
|
+
begin
|
|
116
|
+
response = @client.send(request)
|
|
117
|
+
rescue Net::HTTPRequestTimeout
|
|
118
|
+
raise Auth0::Errors::TimeoutError
|
|
119
|
+
end
|
|
120
|
+
code = response.code.to_i
|
|
121
|
+
if code.between?(200, 299)
|
|
122
|
+
Auth0::Types::AgentResponseContent.load(response.body)
|
|
123
|
+
else
|
|
124
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
125
|
+
raise error_class.new(response.body, code: code)
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Delete an agent
|
|
130
|
+
#
|
|
131
|
+
# @param request_options [Hash]
|
|
132
|
+
# @param params [Hash]
|
|
133
|
+
# @option request_options [String] :base_url
|
|
134
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
135
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
136
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
137
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
138
|
+
# @option params [String] :id
|
|
139
|
+
#
|
|
140
|
+
# @return [untyped]
|
|
141
|
+
def delete(request_options: {}, **params)
|
|
142
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
143
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
144
|
+
base_url: request_options[:base_url],
|
|
145
|
+
method: "DELETE",
|
|
146
|
+
path: "agents/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
147
|
+
request_options: request_options
|
|
148
|
+
)
|
|
149
|
+
begin
|
|
150
|
+
response = @client.send(request)
|
|
151
|
+
rescue Net::HTTPRequestTimeout
|
|
152
|
+
raise Auth0::Errors::TimeoutError
|
|
153
|
+
end
|
|
154
|
+
code = response.code.to_i
|
|
155
|
+
return if code.between?(200, 299)
|
|
156
|
+
|
|
157
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
158
|
+
raise error_class.new(response.body, code: code)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Update an agent
|
|
162
|
+
#
|
|
163
|
+
# @param request_options [Hash]
|
|
164
|
+
# @param params [Auth0::Agents::Types::PatchAgentRequestParameters]
|
|
165
|
+
# @option request_options [String] :base_url
|
|
166
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
167
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
168
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
169
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
170
|
+
# @option params [String] :id
|
|
171
|
+
#
|
|
172
|
+
# @return [Auth0::Types::AgentResponseContent]
|
|
173
|
+
def update(request_options: {}, **params)
|
|
174
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
175
|
+
request_data = Auth0::Agents::Types::PatchAgentRequestParameters.new(params).to_h
|
|
176
|
+
non_body_param_names = %w[id]
|
|
177
|
+
body = request_data.except(*non_body_param_names)
|
|
178
|
+
|
|
179
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
180
|
+
base_url: request_options[:base_url],
|
|
181
|
+
method: "PATCH",
|
|
182
|
+
path: "agents/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
183
|
+
body: body,
|
|
184
|
+
request_options: request_options
|
|
185
|
+
)
|
|
186
|
+
begin
|
|
187
|
+
response = @client.send(request)
|
|
188
|
+
rescue Net::HTTPRequestTimeout
|
|
189
|
+
raise Auth0::Errors::TimeoutError
|
|
190
|
+
end
|
|
191
|
+
code = response.code.to_i
|
|
192
|
+
if code.between?(200, 299)
|
|
193
|
+
Auth0::Types::AgentResponseContent.load(response.body)
|
|
194
|
+
else
|
|
195
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
196
|
+
raise error_class.new(response.body, code: code)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Agents
|
|
5
|
+
module Types
|
|
6
|
+
class CreateAgentRequestContent < Internal::Types::Model
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :client_id, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :external_agent_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Agents
|
|
5
|
+
module Types
|
|
6
|
+
class ListAgentsRequestParameters < Internal::Types::Model
|
|
7
|
+
field :from, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :take, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Agents
|
|
5
|
+
module Types
|
|
6
|
+
class PatchAgentRequestParameters < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/auth0/client.rb
CHANGED
|
@@ -28,6 +28,11 @@ module Auth0
|
|
|
28
28
|
@actions ||= Auth0::Actions::Client.new(client: @raw_client)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# @return [Auth0::Agents::Client]
|
|
32
|
+
def agents
|
|
33
|
+
@agents ||= Auth0::Agents::Client.new(client: @raw_client)
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
# @return [Auth0::Branding::Client]
|
|
32
37
|
def branding
|
|
33
38
|
@branding ||= Auth0::Branding::Client.new(client: @raw_client)
|
|
@@ -21,6 +21,7 @@ module Auth0
|
|
|
21
21
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
22
22
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
23
23
|
# @option request_options [Integer] :timeout_in_seconds
|
|
24
|
+
# @option params [Boolean, nil] :include_totals
|
|
24
25
|
# @option params [String, nil] :from
|
|
25
26
|
# @option params [Integer, nil] :take
|
|
26
27
|
# @option params [String, nil] :audience
|
|
@@ -33,6 +34,7 @@ module Auth0
|
|
|
33
34
|
def list(request_options: {}, **params)
|
|
34
35
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
35
36
|
query_params = {}
|
|
37
|
+
query_params["include_totals"] = params.fetch(:include_totals, true)
|
|
36
38
|
query_params["from"] = params[:from] if params.key?(:from)
|
|
37
39
|
query_params["take"] = params.fetch(:take, 50)
|
|
38
40
|
query_params["audience"] = params[:audience] if params.key?(:audience)
|
|
@@ -19,6 +19,7 @@ module Auth0
|
|
|
19
19
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
20
20
|
# @option request_options [Integer] :timeout_in_seconds
|
|
21
21
|
# @option params [String] :id
|
|
22
|
+
# @option params [Boolean, nil] :include_totals
|
|
22
23
|
# @option params [String, nil] :from
|
|
23
24
|
# @option params [Integer, nil] :take
|
|
24
25
|
#
|
|
@@ -26,6 +27,7 @@ module Auth0
|
|
|
26
27
|
def list(request_options: {}, **params)
|
|
27
28
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
28
29
|
query_params = {}
|
|
30
|
+
query_params["include_totals"] = params.fetch(:include_totals, true)
|
|
29
31
|
query_params["from"] = params[:from] if params.key?(:from)
|
|
30
32
|
query_params["take"] = params.fetch(:take, 50)
|
|
31
33
|
|
|
@@ -7,6 +7,8 @@ module Auth0
|
|
|
7
7
|
class ListClientGrantOrganizationsRequestParameters < Internal::Types::Model
|
|
8
8
|
field :id, -> { String }, optional: false, nullable: false
|
|
9
9
|
|
|
10
|
+
field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
|
+
|
|
10
12
|
field :from, -> { String }, optional: true, nullable: false
|
|
11
13
|
|
|
12
14
|
field :take, -> { Integer }, optional: true, nullable: false
|
|
@@ -4,6 +4,8 @@ module Auth0
|
|
|
4
4
|
module ClientGrants
|
|
5
5
|
module Types
|
|
6
6
|
class ListClientGrantsRequestParameters < Internal::Types::Model
|
|
7
|
+
field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
8
|
+
|
|
7
9
|
field :from, -> { String }, optional: true, nullable: false
|
|
8
10
|
|
|
9
11
|
field :take, -> { Integer }, optional: true, nullable: false
|
|
@@ -39,6 +39,7 @@ module Auth0
|
|
|
39
39
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
40
40
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
41
41
|
# @option request_options [Integer] :timeout_in_seconds
|
|
42
|
+
# @option params [Boolean, nil] :include_totals
|
|
42
43
|
# @option params [String, nil] :from
|
|
43
44
|
# @option params [Integer, nil] :take
|
|
44
45
|
# @option params [Auth0::Types::ConnectionStrategyEnum, nil] :strategy
|
|
@@ -50,6 +51,7 @@ module Auth0
|
|
|
50
51
|
def list(request_options: {}, **params)
|
|
51
52
|
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
52
53
|
query_params = {}
|
|
54
|
+
query_params["include_totals"] = params.fetch(:include_totals, true)
|
|
53
55
|
query_params["from"] = params[:from] if params.key?(:from)
|
|
54
56
|
query_params["take"] = params.fetch(:take, 50)
|
|
55
57
|
query_params["strategy"] = params[:strategy] if params.key?(:strategy)
|
|
@@ -241,6 +241,7 @@ module Auth0
|
|
|
241
241
|
# @option params [String] :id
|
|
242
242
|
# @option params [String, nil] :from
|
|
243
243
|
# @option params [Integer, nil] :take
|
|
244
|
+
# @option params [String, nil] :q
|
|
244
245
|
#
|
|
245
246
|
# @return [Auth0::Types::ListSynchronizedGroupsResponseContent]
|
|
246
247
|
def list_synchronized_groups(request_options: {}, **params)
|
|
@@ -248,6 +249,7 @@ module Auth0
|
|
|
248
249
|
query_params = {}
|
|
249
250
|
query_params["from"] = params[:from] if params.key?(:from)
|
|
250
251
|
query_params["take"] = params.fetch(:take, 50)
|
|
252
|
+
query_params["q"] = params[:q] if params.key?(:q)
|
|
251
253
|
|
|
252
254
|
Auth0::Internal::CursorItemIterator.new(
|
|
253
255
|
cursor_field: :next_,
|
|
@@ -278,6 +280,43 @@ module Auth0
|
|
|
278
280
|
end
|
|
279
281
|
end
|
|
280
282
|
|
|
283
|
+
# Add synchronized group selections to a directory provisioning configuration.
|
|
284
|
+
#
|
|
285
|
+
# @param request_options [Hash]
|
|
286
|
+
# @param params [Auth0::Connections::DirectoryProvisioning::Types::AddSynchronizedGroupsRequestContent]
|
|
287
|
+
# @option request_options [String] :base_url
|
|
288
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
289
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
290
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
291
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
292
|
+
# @option params [String] :id
|
|
293
|
+
#
|
|
294
|
+
# @return [untyped]
|
|
295
|
+
def add_synchronized_group_selections(request_options: {}, **params)
|
|
296
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
297
|
+
request_data = Auth0::Connections::DirectoryProvisioning::Types::AddSynchronizedGroupsRequestContent.new(params).to_h
|
|
298
|
+
non_body_param_names = %w[id]
|
|
299
|
+
body = request_data.except(*non_body_param_names)
|
|
300
|
+
|
|
301
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
302
|
+
base_url: request_options[:base_url],
|
|
303
|
+
method: "POST",
|
|
304
|
+
path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/directory-provisioning/synchronized-groups",
|
|
305
|
+
body: body,
|
|
306
|
+
request_options: request_options
|
|
307
|
+
)
|
|
308
|
+
begin
|
|
309
|
+
response = @client.send(request)
|
|
310
|
+
rescue Net::HTTPRequestTimeout
|
|
311
|
+
raise Auth0::Errors::TimeoutError
|
|
312
|
+
end
|
|
313
|
+
code = response.code.to_i
|
|
314
|
+
return if code.between?(200, 299)
|
|
315
|
+
|
|
316
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
317
|
+
raise error_class.new(response.body, code: code)
|
|
318
|
+
end
|
|
319
|
+
|
|
281
320
|
# Create or replace the selected groups for a connection directory provisioning configuration.
|
|
282
321
|
#
|
|
283
322
|
# @param request_options [Hash]
|
|
@@ -315,6 +354,43 @@ module Auth0
|
|
|
315
354
|
raise error_class.new(response.body, code: code)
|
|
316
355
|
end
|
|
317
356
|
|
|
357
|
+
# Delete synchronized group selections for a directory provisioning configuration
|
|
358
|
+
#
|
|
359
|
+
# @param request_options [Hash]
|
|
360
|
+
# @param params [Auth0::Connections::DirectoryProvisioning::Types::DeleteSynchronizedGroupsRequestContent]
|
|
361
|
+
# @option request_options [String] :base_url
|
|
362
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
363
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
364
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
365
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
366
|
+
# @option params [String] :id
|
|
367
|
+
#
|
|
368
|
+
# @return [untyped]
|
|
369
|
+
def delete_synchronized_group_selections(request_options: {}, **params)
|
|
370
|
+
params = Auth0::Internal::Types::Utils.normalize_keys(params)
|
|
371
|
+
request_data = Auth0::Connections::DirectoryProvisioning::Types::DeleteSynchronizedGroupsRequestContent.new(params).to_h
|
|
372
|
+
non_body_param_names = %w[id]
|
|
373
|
+
body = request_data.except(*non_body_param_names)
|
|
374
|
+
|
|
375
|
+
request = Auth0::Internal::JSON::Request.new(
|
|
376
|
+
base_url: request_options[:base_url],
|
|
377
|
+
method: "DELETE",
|
|
378
|
+
path: "connections/#{URI.encode_uri_component(params[:id].to_s)}/directory-provisioning/synchronized-groups",
|
|
379
|
+
body: body,
|
|
380
|
+
request_options: request_options
|
|
381
|
+
)
|
|
382
|
+
begin
|
|
383
|
+
response = @client.send(request)
|
|
384
|
+
rescue Net::HTTPRequestTimeout
|
|
385
|
+
raise Auth0::Errors::TimeoutError
|
|
386
|
+
end
|
|
387
|
+
code = response.code.to_i
|
|
388
|
+
return if code.between?(200, 299)
|
|
389
|
+
|
|
390
|
+
error_class = Auth0::Errors::ResponseError.subclass_for_code(code)
|
|
391
|
+
raise error_class.new(response.body, code: code)
|
|
392
|
+
end
|
|
393
|
+
|
|
318
394
|
# @return [Auth0::Synchronizations::Client]
|
|
319
395
|
def synchronizations
|
|
320
396
|
@synchronizations ||= Auth0::Connections::DirectoryProvisioning::Synchronizations::Client.new(client: @client)
|
data/lib/auth0/connections/directory_provisioning/types/add_synchronized_groups_request_content.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Connections
|
|
5
|
+
module DirectoryProvisioning
|
|
6
|
+
module Types
|
|
7
|
+
class AddSynchronizedGroupsRequestContent < Internal::Types::Model
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :groups, -> { Internal::Types::Array[Auth0::Types::SynchronizedGroupPayload] }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Auth0
|
|
4
|
+
module Connections
|
|
5
|
+
module DirectoryProvisioning
|
|
6
|
+
module Types
|
|
7
|
+
class DeleteSynchronizedGroupsRequestContent < Internal::Types::Model
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :groups, -> { Internal::Types::Array[Auth0::Types::SynchronizedGroupSelectionID] }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,6 +4,8 @@ module Auth0
|
|
|
4
4
|
module Connections
|
|
5
5
|
module Types
|
|
6
6
|
class ListConnectionsQueryParameters < Internal::Types::Model
|
|
7
|
+
field :include_totals, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
8
|
+
|
|
7
9
|
field :from, -> { String }, optional: true, nullable: false
|
|
8
10
|
|
|
9
11
|
field :take, -> { Integer }, optional: true, nullable: false
|