authentik-api 2026.5.5 → 2026.8.0.rc1

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.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README_API.md +105 -9
  3. data/lib/authentik/api/api/admin_api.rb +3 -0
  4. data/lib/authentik/api/api/core_api.rb +651 -27
  5. data/lib/authentik/api/api/endpoints_api.rb +7 -7
  6. data/lib/authentik/api/api/events_api.rb +35 -2
  7. data/lib/authentik/api/api/lifecycle_api.rb +258 -0
  8. data/lib/authentik/api/api/providers_api.rb +401 -0
  9. data/lib/authentik/api/api/requests_api.rb +1858 -0
  10. data/lib/authentik/api/api/sources_api.rb +6 -3
  11. data/lib/authentik/api/configuration.rb +14 -0
  12. data/lib/authentik/api/inflector.rb +2 -1
  13. data/lib/authentik/api/models/app_enum.rb +3 -1
  14. data/lib/authentik/api/models/application.rb +27 -1
  15. data/lib/authentik/api/models/authenticator_web_authn_stage.rb +1 -11
  16. data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +1 -11
  17. data/lib/authentik/api/models/brand.rb +21 -1
  18. data/lib/authentik/api/models/brand_request.rb +21 -1
  19. data/lib/authentik/api/models/captcha_stage.rb +32 -1
  20. data/lib/authentik/api/models/captcha_stage_request.rb +32 -1
  21. data/lib/authentik/api/models/compatibility_mode_enum.rb +2 -1
  22. data/lib/authentik/api/models/content_type.rb +30 -4
  23. data/lib/authentik/api/models/current_brand.rb +19 -1
  24. data/lib/authentik/api/models/current_brand_flags.rb +1 -55
  25. data/lib/authentik/api/models/device_user_binding.rb +39 -1
  26. data/lib/authentik/api/models/event_actions.rb +6 -1
  27. data/lib/authentik/api/models/grant_request.rb +382 -0
  28. data/lib/authentik/api/models/{reviewer_group.rb → grant_request_create_request.rb} +29 -42
  29. data/lib/authentik/api/models/{grant_types_enum.rb → grant_type_enum.rb} +5 -4
  30. data/lib/authentik/api/models/last_task_status_enum.rb +2 -1
  31. data/lib/authentik/api/models/ldap_outpost_config.rb +1 -1
  32. data/lib/authentik/api/models/ldap_source.rb +14 -4
  33. data/lib/authentik/api/models/ldap_source_request.rb +14 -4
  34. data/lib/authentik/api/models/lifecycle_rule.rb +2 -2
  35. data/lib/authentik/api/models/model_enum.rb +8 -1
  36. data/lib/authentik/api/models/notification_mode_enum.rb +35 -0
  37. data/lib/authentik/api/models/o_auth2_dynamic_client_registration.rb +291 -0
  38. data/lib/authentik/api/models/o_auth2_dynamic_client_registration_request.rb +303 -0
  39. data/lib/authentik/api/models/o_auth2_provider.rb +1 -1
  40. data/lib/authentik/api/models/o_auth2_provider_request.rb +1 -1
  41. data/lib/authentik/api/models/o_auth_source.rb +0 -60
  42. data/lib/authentik/api/models/o_auth_source_request.rb +0 -60
  43. data/lib/authentik/api/models/object_attribute.rb +420 -0
  44. data/lib/authentik/api/models/object_attribute_request.rb +358 -0
  45. data/lib/authentik/api/models/object_attribute_type_enum.rb +35 -0
  46. data/lib/authentik/api/models/offboarding_action_enum.rb +34 -0
  47. data/lib/authentik/api/models/offboarding_status_enum.rb +36 -0
  48. data/lib/authentik/api/models/paginated_grant_request_list.rb +214 -0
  49. data/lib/authentik/api/models/paginated_o_auth2_dynamic_client_registration_list.rb +214 -0
  50. data/lib/authentik/api/models/paginated_object_attribute_list.rb +214 -0
  51. data/lib/authentik/api/models/paginated_request_rule_binding_list.rb +214 -0
  52. data/lib/authentik/api/models/paginated_request_rule_child_binding_list.rb +214 -0
  53. data/lib/authentik/api/models/paginated_request_rule_list.rb +214 -0
  54. data/lib/authentik/api/models/paginated_requestable_target_list.rb +214 -0
  55. data/lib/authentik/api/models/paginated_user_offboarding_list.rb +214 -0
  56. data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +1 -11
  57. data/lib/authentik/api/models/patched_brand_request.rb +21 -1
  58. data/lib/authentik/api/models/patched_captcha_stage_request.rb +32 -1
  59. data/lib/authentik/api/models/patched_grant_request_fulfill_request.rb +175 -0
  60. data/lib/authentik/api/models/patched_ldap_source_request.rb +14 -4
  61. data/lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb +286 -0
  62. data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +1 -1
  63. data/lib/authentik/api/models/patched_o_auth_source_request.rb +0 -60
  64. data/lib/authentik/api/models/patched_object_attribute_request.rb +320 -0
  65. data/lib/authentik/api/models/patched_request_rule_binding_request.rb +249 -0
  66. data/lib/authentik/api/models/patched_request_rule_child_binding_request.rb +159 -0
  67. data/lib/authentik/api/models/patched_request_rule_request.rb +277 -0
  68. data/lib/authentik/api/models/patched_saml_source_request.rb +8 -8
  69. data/lib/authentik/api/models/patched_settings_request.rb +30 -1
  70. data/lib/authentik/api/models/patched_settings_request_flags.rb +1 -1
  71. data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +11 -1
  72. data/lib/authentik/api/models/policy_binding.rb +42 -4
  73. data/lib/authentik/api/models/provider_type_enum.rb +2 -3
  74. data/lib/authentik/api/models/related_rule.rb +2 -2
  75. data/lib/authentik/api/models/related_target.rb +266 -0
  76. data/lib/authentik/api/models/request_content_type_enum.rb +34 -0
  77. data/lib/authentik/api/models/request_rule.rb +329 -0
  78. data/lib/authentik/api/models/request_rule_binding.rb +353 -0
  79. data/lib/authentik/api/models/request_rule_binding_request.rb +283 -0
  80. data/lib/authentik/api/models/{reviewer_user.rb → request_rule_child_binding.rb} +34 -99
  81. data/lib/authentik/api/models/request_rule_child_binding_request.rb +193 -0
  82. data/lib/authentik/api/models/request_rule_request.rb +284 -0
  83. data/lib/authentik/api/models/request_status.rb +36 -0
  84. data/lib/authentik/api/models/requestable_target.rb +278 -0
  85. data/lib/authentik/api/models/review.rb +1 -1
  86. data/lib/authentik/api/models/saml_source.rb +35 -8
  87. data/lib/authentik/api/models/saml_source_request.rb +8 -8
  88. data/lib/authentik/api/models/saml_version_enum.rb +34 -0
  89. data/lib/authentik/api/models/session_user.rb +32 -4
  90. data/lib/authentik/api/models/settings.rb +30 -1
  91. data/lib/authentik/api/models/settings_request.rb +30 -1
  92. data/lib/authentik/api/models/system_info.rb +31 -4
  93. data/lib/authentik/api/models/task_aggregated_status_enum.rb +2 -1
  94. data/lib/authentik/api/models/task_status_enum.rb +2 -1
  95. data/lib/authentik/api/models/user_offboarding.rb +379 -0
  96. data/lib/authentik/api/models/user_offboarding_request.rb +237 -0
  97. data/lib/authentik/api/models/user_self.rb +28 -1
  98. data/lib/authentik/api/models/user_switch_action_enum.rb +34 -0
  99. data/lib/authentik/api/models/user_switch_request.rb +173 -0
  100. data/lib/authentik/api/models/user_switch_response.rb +159 -0
  101. data/lib/authentik/api/models/ws_federation_provider.rb +41 -4
  102. data/lib/authentik/api/models/ws_federation_provider_request.rb +11 -1
  103. data/lib/authentik/api/version.rb +1 -1
  104. data/spec/api/admin_api_spec.rb +1 -0
  105. data/spec/api/core_api_spec.rb +119 -0
  106. data/spec/api/events_api_spec.rb +11 -0
  107. data/spec/api/lifecycle_api_spec.rb +47 -0
  108. data/spec/api/providers_api_spec.rb +73 -0
  109. data/spec/api/requests_api_spec.rb +365 -0
  110. data/spec/api/sources_api_spec.rb +2 -1
  111. data/spec/models/application_spec.rb +6 -0
  112. data/spec/models/authenticator_web_authn_stage_request_spec.rb +0 -6
  113. data/spec/models/authenticator_web_authn_stage_spec.rb +0 -6
  114. data/spec/models/brand_request_spec.rb +12 -0
  115. data/spec/models/brand_spec.rb +12 -0
  116. data/spec/models/captcha_stage_request_spec.rb +6 -0
  117. data/spec/models/captcha_stage_spec.rb +6 -0
  118. data/spec/models/content_type_spec.rb +6 -0
  119. data/spec/models/current_brand_flags_spec.rb +0 -12
  120. data/spec/models/current_brand_spec.rb +12 -0
  121. data/spec/models/device_user_binding_spec.rb +12 -0
  122. data/spec/models/grant_request_create_request_spec.rb +36 -0
  123. data/spec/models/grant_request_spec.rb +90 -0
  124. data/spec/models/{grant_types_enum_spec.rb → grant_type_enum_spec.rb} +6 -6
  125. data/spec/models/ldap_source_request_spec.rb +6 -0
  126. data/spec/models/ldap_source_spec.rb +6 -0
  127. data/spec/models/notification_mode_enum_spec.rb +24 -0
  128. data/spec/models/o_auth2_dynamic_client_registration_request_spec.rb +78 -0
  129. data/spec/models/o_auth2_dynamic_client_registration_spec.rb +84 -0
  130. data/spec/models/object_attribute_request_spec.rb +84 -0
  131. data/spec/models/object_attribute_spec.rb +108 -0
  132. data/spec/models/object_attribute_type_enum_spec.rb +24 -0
  133. data/spec/models/offboarding_action_enum_spec.rb +24 -0
  134. data/spec/models/offboarding_status_enum_spec.rb +24 -0
  135. data/spec/models/paginated_grant_request_list_spec.rb +42 -0
  136. data/spec/models/paginated_o_auth2_dynamic_client_registration_list_spec.rb +42 -0
  137. data/spec/models/paginated_object_attribute_list_spec.rb +42 -0
  138. data/spec/models/paginated_request_rule_binding_list_spec.rb +42 -0
  139. data/spec/models/paginated_request_rule_child_binding_list_spec.rb +42 -0
  140. data/spec/models/paginated_request_rule_list_spec.rb +42 -0
  141. data/spec/models/paginated_requestable_target_list_spec.rb +42 -0
  142. data/spec/models/paginated_user_offboarding_list_spec.rb +42 -0
  143. data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +0 -6
  144. data/spec/models/patched_brand_request_spec.rb +12 -0
  145. data/spec/models/patched_captcha_stage_request_spec.rb +6 -0
  146. data/spec/models/patched_grant_request_fulfill_request_spec.rb +36 -0
  147. data/spec/models/patched_ldap_source_request_spec.rb +6 -0
  148. data/spec/models/patched_o_auth2_dynamic_client_registration_request_spec.rb +78 -0
  149. data/spec/models/patched_object_attribute_request_spec.rb +84 -0
  150. data/spec/models/patched_request_rule_binding_request_spec.rb +60 -0
  151. data/spec/models/patched_request_rule_child_binding_request_spec.rb +42 -0
  152. data/spec/models/patched_request_rule_request_spec.rb +72 -0
  153. data/spec/models/patched_saml_source_request_spec.rb +1 -1
  154. data/spec/models/patched_settings_request_spec.rb +6 -0
  155. data/spec/models/patched_ws_federation_provider_request_spec.rb +6 -0
  156. data/spec/models/policy_binding_spec.rb +12 -0
  157. data/spec/models/related_target_spec.rb +54 -0
  158. data/spec/models/request_content_type_enum_spec.rb +24 -0
  159. data/spec/models/request_rule_binding_request_spec.rb +60 -0
  160. data/spec/models/request_rule_binding_spec.rb +84 -0
  161. data/spec/models/request_rule_child_binding_request_spec.rb +42 -0
  162. data/spec/models/{reviewer_user_spec.rb → request_rule_child_binding_spec.rb} +8 -14
  163. data/spec/models/request_rule_request_spec.rb +72 -0
  164. data/spec/models/request_rule_spec.rb +84 -0
  165. data/spec/models/request_status_spec.rb +24 -0
  166. data/spec/models/requestable_target_spec.rb +60 -0
  167. data/spec/models/saml_source_request_spec.rb +1 -1
  168. data/spec/models/saml_source_spec.rb +7 -1
  169. data/spec/models/saml_version_enum_spec.rb +24 -0
  170. data/spec/models/session_user_spec.rb +6 -0
  171. data/spec/models/settings_request_spec.rb +6 -0
  172. data/spec/models/settings_spec.rb +6 -0
  173. data/spec/models/system_info_spec.rb +6 -0
  174. data/spec/models/user_offboarding_request_spec.rb +54 -0
  175. data/spec/models/user_offboarding_spec.rb +90 -0
  176. data/spec/models/user_self_spec.rb +6 -0
  177. data/spec/models/user_switch_action_enum_spec.rb +24 -0
  178. data/spec/models/{reviewer_group_spec.rb → user_switch_request_spec.rb} +8 -8
  179. data/spec/models/user_switch_response_spec.rb +30 -0
  180. data/spec/models/ws_federation_provider_request_spec.rb +6 -0
  181. data/spec/models/ws_federation_provider_spec.rb +12 -0
  182. metadata +127 -10
@@ -0,0 +1,382 @@
1
+ =begin
2
+ This file is automatically generated by: https://openapi-generator.tech.
3
+ Any manual changes will be lost when the OpenAPI scheme changes.
4
+
5
+ =end
6
+
7
+ require 'date'
8
+ require 'time'
9
+
10
+ module Authentik::Api
11
+ # Mixin to validate that a valid enterprise license exists before allowing to save the object
12
+ class GrantRequest < ApiModelBase
13
+ attr_accessor :created
14
+
15
+ attr_accessor :created_by
16
+
17
+ attr_accessor :requester_data
18
+
19
+ attr_accessor :fulfiller_data
20
+
21
+ attr_accessor :revoked_by
22
+
23
+ attr_accessor :is_active
24
+
25
+ attr_accessor :expires
26
+
27
+ attr_accessor :status
28
+
29
+ attr_accessor :targets
30
+
31
+ attr_accessor :target_objs
32
+
33
+ attr_accessor :uuid
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'created' => :'created',
61
+ :'created_by' => :'created_by',
62
+ :'requester_data' => :'requester_data',
63
+ :'fulfiller_data' => :'fulfiller_data',
64
+ :'revoked_by' => :'revoked_by',
65
+ :'is_active' => :'is_active',
66
+ :'expires' => :'expires',
67
+ :'status' => :'status',
68
+ :'targets' => :'targets',
69
+ :'target_objs' => :'target_objs',
70
+ :'uuid' => :'uuid'
71
+ }
72
+ end
73
+
74
+ # Returns attribute mapping this model knows about
75
+ def self.acceptable_attribute_map
76
+ attribute_map
77
+ end
78
+
79
+ # Returns all the JSON keys this model knows about
80
+ def self.acceptable_attributes
81
+ acceptable_attribute_map.values
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.openapi_types
86
+ {
87
+ :'created' => :'Time',
88
+ :'created_by' => :'PartialUser',
89
+ :'requester_data' => :'Hash<String, Object>',
90
+ :'fulfiller_data' => :'Hash<String, Object>',
91
+ :'revoked_by' => :'PartialUser',
92
+ :'is_active' => :'Boolean',
93
+ :'expires' => :'Time',
94
+ :'status' => :'RequestStatus',
95
+ :'targets' => :'Array<String>',
96
+ :'target_objs' => :'Array<RequestableTarget>',
97
+ :'uuid' => :'String'
98
+ }
99
+ end
100
+
101
+ # List of attributes with nullable: true
102
+ def self.openapi_nullable
103
+ Set.new([
104
+ :'expires',
105
+ ])
106
+ end
107
+
108
+ # Initializes the object
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ def initialize(attributes = {})
111
+ if (!attributes.is_a?(Hash))
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::GrantRequest` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ acceptable_attribute_map = self.class.acceptable_attribute_map
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!acceptable_attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::GrantRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'created')
125
+ self.created = attributes[:'created']
126
+ else
127
+ self.created = nil
128
+ end
129
+
130
+ if attributes.key?(:'created_by')
131
+ self.created_by = attributes[:'created_by']
132
+ else
133
+ self.created_by = nil
134
+ end
135
+
136
+ if attributes.key?(:'requester_data')
137
+ if (value = attributes[:'requester_data']).is_a?(Hash)
138
+ self.requester_data = value
139
+ end
140
+ end
141
+
142
+ if attributes.key?(:'fulfiller_data')
143
+ if (value = attributes[:'fulfiller_data']).is_a?(Hash)
144
+ self.fulfiller_data = value
145
+ end
146
+ end
147
+
148
+ if attributes.key?(:'revoked_by')
149
+ self.revoked_by = attributes[:'revoked_by']
150
+ else
151
+ self.revoked_by = nil
152
+ end
153
+
154
+ if attributes.key?(:'is_active')
155
+ self.is_active = attributes[:'is_active']
156
+ else
157
+ self.is_active = nil
158
+ end
159
+
160
+ if attributes.key?(:'expires')
161
+ self.expires = attributes[:'expires']
162
+ end
163
+
164
+ if attributes.key?(:'status')
165
+ self.status = attributes[:'status']
166
+ else
167
+ self.status = nil
168
+ end
169
+
170
+ if attributes.key?(:'targets')
171
+ if (value = attributes[:'targets']).is_a?(Array)
172
+ self.targets = value
173
+ end
174
+ else
175
+ self.targets = nil
176
+ end
177
+
178
+ if attributes.key?(:'target_objs')
179
+ if (value = attributes[:'target_objs']).is_a?(Array)
180
+ self.target_objs = value
181
+ end
182
+ else
183
+ self.target_objs = nil
184
+ end
185
+
186
+ if attributes.key?(:'uuid')
187
+ self.uuid = attributes[:'uuid']
188
+ end
189
+ end
190
+
191
+ # Show invalid properties with the reasons. Usually used together with valid?
192
+ # @return Array for valid properties with the reasons
193
+ def list_invalid_properties
194
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
195
+ invalid_properties = Array.new
196
+ if @created.nil?
197
+ invalid_properties.push('invalid value for "created", created cannot be nil.')
198
+ end
199
+
200
+ if @created_by.nil?
201
+ invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
202
+ end
203
+
204
+ if @revoked_by.nil?
205
+ invalid_properties.push('invalid value for "revoked_by", revoked_by cannot be nil.')
206
+ end
207
+
208
+ if @is_active.nil?
209
+ invalid_properties.push('invalid value for "is_active", is_active cannot be nil.')
210
+ end
211
+
212
+ if @status.nil?
213
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
214
+ end
215
+
216
+ if @targets.nil?
217
+ invalid_properties.push('invalid value for "targets", targets cannot be nil.')
218
+ end
219
+
220
+ if @target_objs.nil?
221
+ invalid_properties.push('invalid value for "target_objs", target_objs cannot be nil.')
222
+ end
223
+
224
+ invalid_properties
225
+ end
226
+
227
+ # Check to see if the all the properties in the model are valid
228
+ # @return true if the model is valid
229
+ def valid?
230
+ warn '[DEPRECATED] the `valid?` method is obsolete'
231
+ return false if @created.nil?
232
+ return false if @created_by.nil?
233
+ return false if @revoked_by.nil?
234
+ return false if @is_active.nil?
235
+ return false if @status.nil?
236
+ return false if @targets.nil?
237
+ return false if @target_objs.nil?
238
+ true
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] created Value to be assigned
243
+ def created=(created)
244
+ if created.nil?
245
+ fail ArgumentError, 'created cannot be nil'
246
+ end
247
+
248
+ @created = created
249
+ end
250
+
251
+ # Custom attribute writer method with validation
252
+ # @param [Object] created_by Value to be assigned
253
+ def created_by=(created_by)
254
+ if created_by.nil?
255
+ fail ArgumentError, 'created_by cannot be nil'
256
+ end
257
+
258
+ @created_by = created_by
259
+ end
260
+
261
+ # Custom attribute writer method with validation
262
+ # @param [Object] revoked_by Value to be assigned
263
+ def revoked_by=(revoked_by)
264
+ if revoked_by.nil?
265
+ fail ArgumentError, 'revoked_by cannot be nil'
266
+ end
267
+
268
+ @revoked_by = revoked_by
269
+ end
270
+
271
+ # Custom attribute writer method with validation
272
+ # @param [Object] is_active Value to be assigned
273
+ def is_active=(is_active)
274
+ if is_active.nil?
275
+ fail ArgumentError, 'is_active cannot be nil'
276
+ end
277
+
278
+ @is_active = is_active
279
+ end
280
+
281
+ # Custom attribute writer method with validation
282
+ # @param [Object] status Value to be assigned
283
+ def status=(status)
284
+ if status.nil?
285
+ fail ArgumentError, 'status cannot be nil'
286
+ end
287
+
288
+ @status = status
289
+ end
290
+
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] targets Value to be assigned
293
+ def targets=(targets)
294
+ if targets.nil?
295
+ fail ArgumentError, 'targets cannot be nil'
296
+ end
297
+
298
+ @targets = targets
299
+ end
300
+
301
+ # Custom attribute writer method with validation
302
+ # @param [Object] target_objs Value to be assigned
303
+ def target_objs=(target_objs)
304
+ if target_objs.nil?
305
+ fail ArgumentError, 'target_objs cannot be nil'
306
+ end
307
+
308
+ @target_objs = target_objs
309
+ end
310
+
311
+ # Checks equality by comparing each attribute.
312
+ # @param [Object] Object to be compared
313
+ def ==(o)
314
+ return true if self.equal?(o)
315
+ self.class == o.class &&
316
+ created == o.created &&
317
+ created_by == o.created_by &&
318
+ requester_data == o.requester_data &&
319
+ fulfiller_data == o.fulfiller_data &&
320
+ revoked_by == o.revoked_by &&
321
+ is_active == o.is_active &&
322
+ expires == o.expires &&
323
+ status == o.status &&
324
+ targets == o.targets &&
325
+ target_objs == o.target_objs &&
326
+ uuid == o.uuid
327
+ end
328
+
329
+ # @see the `==` method
330
+ # @param [Object] Object to be compared
331
+ def eql?(o)
332
+ self == o
333
+ end
334
+
335
+ # Calculates hash code according to all attributes.
336
+ # @return [Integer] Hash code
337
+ def hash
338
+ [created, created_by, requester_data, fulfiller_data, revoked_by, is_active, expires, status, targets, target_objs, uuid].hash
339
+ end
340
+
341
+ # Builds the object from hash
342
+ # @param [Hash] attributes Model attributes in the form of hash
343
+ # @return [Object] Returns the model itself
344
+ def self.build_from_hash(attributes)
345
+ return nil unless attributes.is_a?(Hash)
346
+ attributes = attributes.transform_keys(&:to_sym)
347
+ transformed_hash = {}
348
+ openapi_types.each_pair do |key, type|
349
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
350
+ transformed_hash["#{key}"] = nil
351
+ elsif type =~ /\AArray<(.*)>/i
352
+ # check to ensure the input is an array given that the attribute
353
+ # is documented as an array but the input is not
354
+ if attributes[attribute_map[key]].is_a?(Array)
355
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
356
+ end
357
+ elsif !attributes[attribute_map[key]].nil?
358
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
359
+ end
360
+ end
361
+ new(transformed_hash)
362
+ end
363
+
364
+ # Returns the object in the form of hash
365
+ # @return [Hash] Returns the object in the form of hash
366
+ def to_hash
367
+ hash = {}
368
+ self.class.attribute_map.each_pair do |attr, param|
369
+ value = self.send(attr)
370
+ if value.nil?
371
+ is_nullable = self.class.openapi_nullable.include?(attr)
372
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
373
+ end
374
+
375
+ hash[param] = _to_hash(value)
376
+ end
377
+ hash
378
+ end
379
+
380
+ end
381
+
382
+ end
@@ -8,16 +8,18 @@ require 'date'
8
8
  require 'time'
9
9
 
10
10
  module Authentik::Api
11
- class ReviewerGroup < ApiModelBase
12
- attr_accessor :pk
11
+ # Base serializer class which doesn't implement create/update methods
12
+ class GrantRequestCreateRequest < ApiModelBase
13
+ attr_accessor :pbms
13
14
 
14
- attr_accessor :name
15
+ # Optional override for how long the grant should last once approved. Clamped to the granting rule binding(s)' expiry_granted_max.
16
+ attr_accessor :expiry
15
17
 
16
18
  # Attribute mapping from ruby-style variable name to JSON key.
17
19
  def self.attribute_map
18
20
  {
19
- :'pk' => :'pk',
20
- :'name' => :'name'
21
+ :'pbms' => :'pbms',
22
+ :'expiry' => :'expiry'
21
23
  }
22
24
  end
23
25
 
@@ -34,8 +36,8 @@ module Authentik::Api
34
36
  # Attribute type mapping.
35
37
  def self.openapi_types
36
38
  {
37
- :'pk' => :'String',
38
- :'name' => :'String'
39
+ :'pbms' => :'Array<String>',
40
+ :'expiry' => :'String'
39
41
  }
40
42
  end
41
43
 
@@ -49,28 +51,28 @@ module Authentik::Api
49
51
  # @param [Hash] attributes Model attributes in the form of hash
50
52
  def initialize(attributes = {})
51
53
  if (!attributes.is_a?(Hash))
52
- fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::ReviewerGroup` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::GrantRequestCreateRequest` initialize method"
53
55
  end
54
56
 
55
57
  # check to see if the attribute exists and convert string to symbol for hash key
56
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
57
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
60
  if (!acceptable_attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::ReviewerGroup`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::GrantRequestCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
60
62
  end
61
63
  h[k.to_sym] = v
62
64
  }
63
65
 
64
- if attributes.key?(:'pk')
65
- self.pk = attributes[:'pk']
66
+ if attributes.key?(:'pbms')
67
+ if (value = attributes[:'pbms']).is_a?(Array)
68
+ self.pbms = value
69
+ end
66
70
  else
67
- self.pk = nil
71
+ self.pbms = nil
68
72
  end
69
73
 
70
- if attributes.key?(:'name')
71
- self.name = attributes[:'name']
72
- else
73
- self.name = nil
74
+ if attributes.key?(:'expiry')
75
+ self.expiry = attributes[:'expiry']
74
76
  end
75
77
  end
76
78
 
@@ -79,12 +81,8 @@ module Authentik::Api
79
81
  def list_invalid_properties
80
82
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
83
  invalid_properties = Array.new
82
- if @pk.nil?
83
- invalid_properties.push('invalid value for "pk", pk cannot be nil.')
84
- end
85
-
86
- if @name.nil?
87
- invalid_properties.push('invalid value for "name", name cannot be nil.')
84
+ if @pbms.nil?
85
+ invalid_properties.push('invalid value for "pbms", pbms cannot be nil.')
88
86
  end
89
87
 
90
88
  invalid_properties
@@ -94,29 +92,18 @@ module Authentik::Api
94
92
  # @return true if the model is valid
95
93
  def valid?
96
94
  warn '[DEPRECATED] the `valid?` method is obsolete'
97
- return false if @pk.nil?
98
- return false if @name.nil?
95
+ return false if @pbms.nil?
99
96
  true
100
97
  end
101
98
 
102
99
  # Custom attribute writer method with validation
103
- # @param [Object] pk Value to be assigned
104
- def pk=(pk)
105
- if pk.nil?
106
- fail ArgumentError, 'pk cannot be nil'
107
- end
108
-
109
- @pk = pk
110
- end
111
-
112
- # Custom attribute writer method with validation
113
- # @param [Object] name Value to be assigned
114
- def name=(name)
115
- if name.nil?
116
- fail ArgumentError, 'name cannot be nil'
100
+ # @param [Object] pbms Value to be assigned
101
+ def pbms=(pbms)
102
+ if pbms.nil?
103
+ fail ArgumentError, 'pbms cannot be nil'
117
104
  end
118
105
 
119
- @name = name
106
+ @pbms = pbms
120
107
  end
121
108
 
122
109
  # Checks equality by comparing each attribute.
@@ -124,8 +111,8 @@ module Authentik::Api
124
111
  def ==(o)
125
112
  return true if self.equal?(o)
126
113
  self.class == o.class &&
127
- pk == o.pk &&
128
- name == o.name
114
+ pbms == o.pbms &&
115
+ expiry == o.expiry
129
116
  end
130
117
 
131
118
  # @see the `==` method
@@ -137,7 +124,7 @@ module Authentik::Api
137
124
  # Calculates hash code according to all attributes.
138
125
  # @return [Integer] Hash code
139
126
  def hash
140
- [pk, name].hash
127
+ [pbms, expiry].hash
141
128
  end
142
129
 
143
130
  # Builds the object from hash
@@ -8,7 +8,7 @@ require 'date'
8
8
  require 'time'
9
9
 
10
10
  module Authentik::Api
11
- class GrantTypesEnum
11
+ class GrantTypeEnum
12
12
  AUTHORIZATION_CODE = "authorization_code".freeze
13
13
  IMPLICIT = "implicit".freeze
14
14
  HYBRID = "hybrid".freeze
@@ -16,9 +16,10 @@ module Authentik::Api
16
16
  CLIENT_CREDENTIALS = "client_credentials".freeze
17
17
  PASSWORD = "password".freeze
18
18
  URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = "urn:ietf:params:oauth:grant-type:device_code".freeze
19
+ URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE = "urn:ietf:params:oauth:grant-type:token-exchange".freeze
19
20
 
20
21
  def self.all_vars
21
- @all_vars ||= [AUTHORIZATION_CODE, IMPLICIT, HYBRID, REFRESH_TOKEN, CLIENT_CREDENTIALS, PASSWORD, URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE].freeze
22
+ @all_vars ||= [AUTHORIZATION_CODE, IMPLICIT, HYBRID, REFRESH_TOKEN, CLIENT_CREDENTIALS, PASSWORD, URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE, URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE].freeze
22
23
  end
23
24
 
24
25
  # Builds the enum from string
@@ -32,8 +33,8 @@ module Authentik::Api
32
33
  # @param [String] The enum value in the form of the string
33
34
  # @return [String] The enum value
34
35
  def build_from_hash(value)
35
- return value if GrantTypesEnum.all_vars.include?(value)
36
- raise "Invalid ENUM value #{value} for class #GrantTypesEnum"
36
+ return value if GrantTypeEnum.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #GrantTypeEnum"
37
38
  end
38
39
  end
39
40
  end
@@ -9,6 +9,7 @@ require 'time'
9
9
 
10
10
  module Authentik::Api
11
11
  class LastTaskStatusEnum
12
+ WAITING_FOR_DEPENDENCIES = "waiting_for_dependencies".freeze
12
13
  QUEUED = "queued".freeze
13
14
  CONSUMED = "consumed".freeze
14
15
  PREPROCESS = "preprocess".freeze
@@ -21,7 +22,7 @@ module Authentik::Api
21
22
  ERROR = "error".freeze
22
23
 
23
24
  def self.all_vars
24
- @all_vars ||= [QUEUED, CONSUMED, PREPROCESS, RUNNING, POSTPROCESS, REJECTED, DONE, INFO, WARNING, ERROR].freeze
25
+ @all_vars ||= [WAITING_FOR_DEPENDENCIES, QUEUED, CONSUMED, PREPROCESS, RUNNING, POSTPROCESS, REJECTED, DONE, INFO, WARNING, ERROR].freeze
25
26
  end
26
27
 
27
28
  # Builds the enum from string
@@ -22,7 +22,7 @@ module Authentik::Api
22
22
  # Get slug for unbind flow, defaulting to brand's default flow.
23
23
  attr_accessor :unbind_flow_slug
24
24
 
25
- # Prioritise backchannel slug over direct application slug
25
+ # Prioritize backchannel slug over direct application slug
26
26
  attr_accessor :application_slug
27
27
 
28
28
  attr_accessor :certificate
@@ -122,6 +122,9 @@ module Authentik::Api
122
122
  # When to trigger sync for outgoing providers
123
123
  attr_accessor :sync_outgoing_trigger_mode
124
124
 
125
+ # Sync group parentage/hierarchy from LDAP directories.
126
+ attr_accessor :sync_group_hierarchy
127
+
125
128
  class EnumAttributeValidator
126
129
  attr_reader :datatype
127
130
  attr_reader :allowable_values
@@ -189,7 +192,8 @@ module Authentik::Api
189
192
  :'connectivity' => :'connectivity',
190
193
  :'lookup_groups_from_user' => :'lookup_groups_from_user',
191
194
  :'delete_not_found_objects' => :'delete_not_found_objects',
192
- :'sync_outgoing_trigger_mode' => :'sync_outgoing_trigger_mode'
195
+ :'sync_outgoing_trigger_mode' => :'sync_outgoing_trigger_mode',
196
+ :'sync_group_hierarchy' => :'sync_group_hierarchy'
193
197
  }
194
198
  end
195
199
 
@@ -248,7 +252,8 @@ module Authentik::Api
248
252
  :'connectivity' => :'Hash<String, Hash<String, String>>',
249
253
  :'lookup_groups_from_user' => :'Boolean',
250
254
  :'delete_not_found_objects' => :'Boolean',
251
- :'sync_outgoing_trigger_mode' => :'SyncOutgoingTriggerModeEnum'
255
+ :'sync_outgoing_trigger_mode' => :'SyncOutgoingTriggerModeEnum',
256
+ :'sync_group_hierarchy' => :'Boolean'
252
257
  }
253
258
  end
254
259
 
@@ -485,6 +490,10 @@ module Authentik::Api
485
490
  if attributes.key?(:'sync_outgoing_trigger_mode')
486
491
  self.sync_outgoing_trigger_mode = attributes[:'sync_outgoing_trigger_mode']
487
492
  end
493
+
494
+ if attributes.key?(:'sync_group_hierarchy')
495
+ self.sync_group_hierarchy = attributes[:'sync_group_hierarchy']
496
+ end
488
497
  end
489
498
 
490
499
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -710,7 +719,8 @@ module Authentik::Api
710
719
  connectivity == o.connectivity &&
711
720
  lookup_groups_from_user == o.lookup_groups_from_user &&
712
721
  delete_not_found_objects == o.delete_not_found_objects &&
713
- sync_outgoing_trigger_mode == o.sync_outgoing_trigger_mode
722
+ sync_outgoing_trigger_mode == o.sync_outgoing_trigger_mode &&
723
+ sync_group_hierarchy == o.sync_group_hierarchy
714
724
  end
715
725
 
716
726
  # @see the `==` method
@@ -722,7 +732,7 @@ module Authentik::Api
722
732
  # Calculates hash code according to all attributes.
723
733
  # @return [Integer] Hash code
724
734
  def hash
725
- [pk, name, slug, enabled, promoted, authentication_flow, enrollment_flow, user_property_mappings, group_property_mappings, component, verbose_name, verbose_name_plural, meta_model_name, policy_engine_mode, user_matching_mode, managed, user_path_template, icon, icon_url, icon_themed_urls, server_uri, peer_certificate, client_certificate, bind_cn, start_tls, sni, base_dn, additional_user_dn, additional_group_dn, user_object_filter, group_object_filter, group_membership_field, user_membership_attribute, object_uniqueness_field, password_login_update_internal_password, sync_users, sync_users_password, sync_groups, sync_parent_group, connectivity, lookup_groups_from_user, delete_not_found_objects, sync_outgoing_trigger_mode].hash
735
+ [pk, name, slug, enabled, promoted, authentication_flow, enrollment_flow, user_property_mappings, group_property_mappings, component, verbose_name, verbose_name_plural, meta_model_name, policy_engine_mode, user_matching_mode, managed, user_path_template, icon, icon_url, icon_themed_urls, server_uri, peer_certificate, client_certificate, bind_cn, start_tls, sni, base_dn, additional_user_dn, additional_group_dn, user_object_filter, group_object_filter, group_membership_field, user_membership_attribute, object_uniqueness_field, password_login_update_internal_password, sync_users, sync_users_password, sync_groups, sync_parent_group, connectivity, lookup_groups_from_user, delete_not_found_objects, sync_outgoing_trigger_mode, sync_group_hierarchy].hash
726
736
  end
727
737
 
728
738
  # Builds the object from hash