ssoready 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/environment.rb +7 -0
- data/lib/gemconfig.rb +14 -0
- data/lib/requests.rb +159 -0
- data/lib/ssoready/management/client.rb +51 -0
- data/lib/ssoready/management/organizations/client.rb +247 -0
- data/lib/ssoready/management/saml_connections/client.rb +269 -0
- data/lib/ssoready/management/scim_directories/client.rb +330 -0
- data/lib/ssoready/management/setup_urls/client.rb +97 -0
- data/lib/ssoready/saml/client.rb +170 -0
- data/lib/ssoready/scim/client.rb +296 -0
- data/lib/ssoready/types/create_organization_response.rb +63 -0
- data/lib/ssoready/types/create_saml_connection_response.rb +63 -0
- data/lib/ssoready/types/create_scim_directory_response.rb +63 -0
- data/lib/ssoready/types/create_setup_url_response.rb +62 -0
- data/lib/ssoready/types/get_organization_response.rb +63 -0
- data/lib/ssoready/types/get_saml_connection_response.rb +63 -0
- data/lib/ssoready/types/get_saml_redirect_url_response.rb +56 -0
- data/lib/ssoready/types/get_scim_directory_response.rb +63 -0
- data/lib/ssoready/types/get_scim_group_response.rb +63 -0
- data/lib/ssoready/types/get_scim_user_response.rb +63 -0
- data/lib/ssoready/types/google_protobuf_any.rb +58 -0
- data/lib/ssoready/types/list_organizations_response.rb +73 -0
- data/lib/ssoready/types/list_saml_connections_response.rb +73 -0
- data/lib/ssoready/types/list_scim_directories_response.rb +73 -0
- data/lib/ssoready/types/list_scim_groups_response.rb +73 -0
- data/lib/ssoready/types/list_scim_users_response.rb +73 -0
- data/lib/ssoready/types/organization.rb +112 -0
- data/lib/ssoready/types/redeem_saml_access_code_response.rb +126 -0
- data/lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb +63 -0
- data/lib/ssoready/types/saml_connection.rb +144 -0
- data/lib/ssoready/types/scim_directory.rb +104 -0
- data/lib/ssoready/types/scim_group.rb +114 -0
- data/lib/ssoready/types/scim_user.rb +102 -0
- data/lib/ssoready/types/status.rb +94 -0
- data/lib/ssoready/types/update_organization_response.rb +63 -0
- data/lib/ssoready/types/update_saml_connection_response.rb +63 -0
- data/lib/ssoready/types/update_scim_directory_response.rb +63 -0
- data/lib/ssoready.rb +68 -0
- data/lib/types_export.rb +29 -0
- metadata +163 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "scim_directory"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module SSOReady
|
8
|
+
class UpdateSCIMDirectoryResponse
|
9
|
+
# @return [SSOReady::SCIMDirectory] The updated SCIM directory.
|
10
|
+
attr_reader :scim_directory
|
11
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
|
+
attr_reader :additional_properties
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :_field_set
|
15
|
+
protected :_field_set
|
16
|
+
|
17
|
+
OMIT = Object.new
|
18
|
+
|
19
|
+
# @param scim_directory [SSOReady::SCIMDirectory] The updated SCIM directory.
|
20
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
# @return [SSOReady::UpdateSCIMDirectoryResponse]
|
22
|
+
def initialize(scim_directory: OMIT, additional_properties: nil)
|
23
|
+
@scim_directory = scim_directory if scim_directory != OMIT
|
24
|
+
@additional_properties = additional_properties
|
25
|
+
@_field_set = { "scimDirectory": scim_directory }.reject do |_k, v|
|
26
|
+
v == OMIT
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of UpdateSCIMDirectoryResponse
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [SSOReady::UpdateSCIMDirectoryResponse]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
parsed_json = JSON.parse(json_object)
|
37
|
+
if parsed_json["scimDirectory"].nil?
|
38
|
+
scim_directory = nil
|
39
|
+
else
|
40
|
+
scim_directory = parsed_json["scimDirectory"].to_json
|
41
|
+
scim_directory = SSOReady::SCIMDirectory.from_json(json_object: scim_directory)
|
42
|
+
end
|
43
|
+
new(scim_directory: scim_directory, additional_properties: struct)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serialize an instance of UpdateSCIMDirectoryResponse to a JSON object
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
def to_json(*_args)
|
50
|
+
@_field_set&.to_json
|
51
|
+
end
|
52
|
+
|
53
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
54
|
+
# hash and check each fields type against the current object's property
|
55
|
+
# definitions.
|
56
|
+
#
|
57
|
+
# @param obj [Object]
|
58
|
+
# @return [Void]
|
59
|
+
def self.validate_raw(obj:)
|
60
|
+
obj.scim_directory.nil? || SSOReady::SCIMDirectory.validate_raw(obj: obj.scim_directory)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/lib/ssoready.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "environment"
|
4
|
+
require_relative "types_export"
|
5
|
+
require_relative "requests"
|
6
|
+
require_relative "ssoready/saml/client"
|
7
|
+
require_relative "ssoready/scim/client"
|
8
|
+
require_relative "ssoready/management/client"
|
9
|
+
|
10
|
+
module SSOReady
|
11
|
+
class Client
|
12
|
+
# @return [SSOReady::SAMLClient]
|
13
|
+
attr_reader :saml
|
14
|
+
# @return [SSOReady::SCIMClient]
|
15
|
+
attr_reader :scim
|
16
|
+
# @return [SSOReady::Management::Client]
|
17
|
+
attr_reader :management
|
18
|
+
|
19
|
+
# @param environment [SSOReady::Environment]
|
20
|
+
# @param base_url [String]
|
21
|
+
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
22
|
+
# @param timeout_in_seconds [Long]
|
23
|
+
# @param api_key [String]
|
24
|
+
# @return [SSOReady::Client]
|
25
|
+
def initialize(environment: SSOReady::Environment::DEFAULT, base_url: nil, max_retries: nil,
|
26
|
+
timeout_in_seconds: nil, api_key: nil)
|
27
|
+
@request_client = SSOReady::RequestClient.new(
|
28
|
+
environment: environment,
|
29
|
+
base_url: base_url,
|
30
|
+
max_retries: max_retries,
|
31
|
+
timeout_in_seconds: timeout_in_seconds,
|
32
|
+
api_key: api_key
|
33
|
+
)
|
34
|
+
@saml = SSOReady::SAMLClient.new(request_client: @request_client)
|
35
|
+
@scim = SSOReady::SCIMClient.new(request_client: @request_client)
|
36
|
+
@management = SSOReady::Management::Client.new(request_client: @request_client)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
class AsyncClient
|
41
|
+
# @return [SSOReady::AsyncSAMLClient]
|
42
|
+
attr_reader :saml
|
43
|
+
# @return [SSOReady::AsyncSCIMClient]
|
44
|
+
attr_reader :scim
|
45
|
+
# @return [SSOReady::Management::AsyncClient]
|
46
|
+
attr_reader :management
|
47
|
+
|
48
|
+
# @param environment [SSOReady::Environment]
|
49
|
+
# @param base_url [String]
|
50
|
+
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
51
|
+
# @param timeout_in_seconds [Long]
|
52
|
+
# @param api_key [String]
|
53
|
+
# @return [SSOReady::AsyncClient]
|
54
|
+
def initialize(environment: SSOReady::Environment::DEFAULT, base_url: nil, max_retries: nil,
|
55
|
+
timeout_in_seconds: nil, api_key: nil)
|
56
|
+
@async_request_client = SSOReady::AsyncRequestClient.new(
|
57
|
+
environment: environment,
|
58
|
+
base_url: base_url,
|
59
|
+
max_retries: max_retries,
|
60
|
+
timeout_in_seconds: timeout_in_seconds,
|
61
|
+
api_key: api_key
|
62
|
+
)
|
63
|
+
@saml = SSOReady::AsyncSAMLClient.new(request_client: @async_request_client)
|
64
|
+
@scim = SSOReady::AsyncSCIMClient.new(request_client: @async_request_client)
|
65
|
+
@management = SSOReady::Management::AsyncClient.new(request_client: @async_request_client)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/lib/types_export.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "ssoready/types/create_organization_response"
|
4
|
+
require_relative "ssoready/types/create_saml_connection_response"
|
5
|
+
require_relative "ssoready/types/create_scim_directory_response"
|
6
|
+
require_relative "ssoready/types/create_setup_url_response"
|
7
|
+
require_relative "ssoready/types/get_organization_response"
|
8
|
+
require_relative "ssoready/types/get_saml_connection_response"
|
9
|
+
require_relative "ssoready/types/get_saml_redirect_url_response"
|
10
|
+
require_relative "ssoready/types/get_scim_directory_response"
|
11
|
+
require_relative "ssoready/types/get_scim_group_response"
|
12
|
+
require_relative "ssoready/types/get_scim_user_response"
|
13
|
+
require_relative "ssoready/types/google_protobuf_any"
|
14
|
+
require_relative "ssoready/types/list_organizations_response"
|
15
|
+
require_relative "ssoready/types/list_saml_connections_response"
|
16
|
+
require_relative "ssoready/types/list_scim_directories_response"
|
17
|
+
require_relative "ssoready/types/list_scim_groups_response"
|
18
|
+
require_relative "ssoready/types/list_scim_users_response"
|
19
|
+
require_relative "ssoready/types/organization"
|
20
|
+
require_relative "ssoready/types/redeem_saml_access_code_response"
|
21
|
+
require_relative "ssoready/types/rotate_scim_directory_bearer_token_response"
|
22
|
+
require_relative "ssoready/types/saml_connection"
|
23
|
+
require_relative "ssoready/types/scim_directory"
|
24
|
+
require_relative "ssoready/types/scim_group"
|
25
|
+
require_relative "ssoready/types/scim_user"
|
26
|
+
require_relative "ssoready/types/status"
|
27
|
+
require_relative "ssoready/types/update_organization_response"
|
28
|
+
require_relative "ssoready/types/update_saml_connection_response"
|
29
|
+
require_relative "ssoready/types/update_scim_directory_response"
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ssoready
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ''
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-11-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: async-http-faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: faraday
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.10'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '3.0'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.10'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '3.0'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: faraday-net_http
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.0'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '4.0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.0'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '4.0'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: faraday-retry
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1.0'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
type: :runtime
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.0'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '3.0'
|
93
|
+
description: ''
|
94
|
+
email: ''
|
95
|
+
executables: []
|
96
|
+
extensions: []
|
97
|
+
extra_rdoc_files: []
|
98
|
+
files:
|
99
|
+
- lib/environment.rb
|
100
|
+
- lib/gemconfig.rb
|
101
|
+
- lib/requests.rb
|
102
|
+
- lib/ssoready.rb
|
103
|
+
- lib/ssoready/management/client.rb
|
104
|
+
- lib/ssoready/management/organizations/client.rb
|
105
|
+
- lib/ssoready/management/saml_connections/client.rb
|
106
|
+
- lib/ssoready/management/scim_directories/client.rb
|
107
|
+
- lib/ssoready/management/setup_urls/client.rb
|
108
|
+
- lib/ssoready/saml/client.rb
|
109
|
+
- lib/ssoready/scim/client.rb
|
110
|
+
- lib/ssoready/types/create_organization_response.rb
|
111
|
+
- lib/ssoready/types/create_saml_connection_response.rb
|
112
|
+
- lib/ssoready/types/create_scim_directory_response.rb
|
113
|
+
- lib/ssoready/types/create_setup_url_response.rb
|
114
|
+
- lib/ssoready/types/get_organization_response.rb
|
115
|
+
- lib/ssoready/types/get_saml_connection_response.rb
|
116
|
+
- lib/ssoready/types/get_saml_redirect_url_response.rb
|
117
|
+
- lib/ssoready/types/get_scim_directory_response.rb
|
118
|
+
- lib/ssoready/types/get_scim_group_response.rb
|
119
|
+
- lib/ssoready/types/get_scim_user_response.rb
|
120
|
+
- lib/ssoready/types/google_protobuf_any.rb
|
121
|
+
- lib/ssoready/types/list_organizations_response.rb
|
122
|
+
- lib/ssoready/types/list_saml_connections_response.rb
|
123
|
+
- lib/ssoready/types/list_scim_directories_response.rb
|
124
|
+
- lib/ssoready/types/list_scim_groups_response.rb
|
125
|
+
- lib/ssoready/types/list_scim_users_response.rb
|
126
|
+
- lib/ssoready/types/organization.rb
|
127
|
+
- lib/ssoready/types/redeem_saml_access_code_response.rb
|
128
|
+
- lib/ssoready/types/rotate_scim_directory_bearer_token_response.rb
|
129
|
+
- lib/ssoready/types/saml_connection.rb
|
130
|
+
- lib/ssoready/types/scim_directory.rb
|
131
|
+
- lib/ssoready/types/scim_group.rb
|
132
|
+
- lib/ssoready/types/scim_user.rb
|
133
|
+
- lib/ssoready/types/status.rb
|
134
|
+
- lib/ssoready/types/update_organization_response.rb
|
135
|
+
- lib/ssoready/types/update_saml_connection_response.rb
|
136
|
+
- lib/ssoready/types/update_scim_directory_response.rb
|
137
|
+
- lib/types_export.rb
|
138
|
+
homepage: https://github.com/ssoready/ssoready-ruby
|
139
|
+
licenses: []
|
140
|
+
metadata:
|
141
|
+
homepage_uri: https://github.com/ssoready/ssoready-ruby
|
142
|
+
source_code_uri: https://github.com/ssoready/ssoready-ruby
|
143
|
+
changelog_uri: https://github.com/ssoready/ssoready-ruby/blob/master/CHANGELOG.md
|
144
|
+
post_install_message:
|
145
|
+
rdoc_options: []
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.7.0
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubygems_version: 3.1.6
|
160
|
+
signing_key:
|
161
|
+
specification_version: 4
|
162
|
+
summary: ''
|
163
|
+
test_files: []
|