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
@@ -46,8 +46,8 @@ module Authentik::Api
46
46
  # Flow used before authentication.
47
47
  attr_accessor :pre_authentication_flow
48
48
 
49
- # Also known as Entity ID. Defaults the Metadata URL.
50
- attr_accessor :issuer
49
+ # Also known as Entity ID. Defaults to the Metadata URL.
50
+ attr_accessor :issuer_override
51
51
 
52
52
  # URL that the initial Login request is sent to.
53
53
  attr_accessor :sso_url
@@ -125,7 +125,7 @@ module Authentik::Api
125
125
  :'icon' => :'icon',
126
126
  :'group_matching_mode' => :'group_matching_mode',
127
127
  :'pre_authentication_flow' => :'pre_authentication_flow',
128
- :'issuer' => :'issuer',
128
+ :'issuer_override' => :'issuer_override',
129
129
  :'sso_url' => :'sso_url',
130
130
  :'slo_url' => :'slo_url',
131
131
  :'allow_idp_initiated' => :'allow_idp_initiated',
@@ -170,7 +170,7 @@ module Authentik::Api
170
170
  :'icon' => :'String',
171
171
  :'group_matching_mode' => :'GroupMatchingModeEnum',
172
172
  :'pre_authentication_flow' => :'String',
173
- :'issuer' => :'String',
173
+ :'issuer_override' => :'String',
174
174
  :'sso_url' => :'String',
175
175
  :'slo_url' => :'String',
176
176
  :'allow_idp_initiated' => :'Boolean',
@@ -276,8 +276,8 @@ module Authentik::Api
276
276
  self.pre_authentication_flow = attributes[:'pre_authentication_flow']
277
277
  end
278
278
 
279
- if attributes.key?(:'issuer')
280
- self.issuer = attributes[:'issuer']
279
+ if attributes.key?(:'issuer_override')
280
+ self.issuer_override = attributes[:'issuer_override']
281
281
  end
282
282
 
283
283
  if attributes.key?(:'sso_url')
@@ -477,7 +477,7 @@ module Authentik::Api
477
477
  icon == o.icon &&
478
478
  group_matching_mode == o.group_matching_mode &&
479
479
  pre_authentication_flow == o.pre_authentication_flow &&
480
- issuer == o.issuer &&
480
+ issuer_override == o.issuer_override &&
481
481
  sso_url == o.sso_url &&
482
482
  slo_url == o.slo_url &&
483
483
  allow_idp_initiated == o.allow_idp_initiated &&
@@ -503,7 +503,7 @@ module Authentik::Api
503
503
  # Calculates hash code according to all attributes.
504
504
  # @return [Integer] Hash code
505
505
  def hash
506
- [name, slug, enabled, promoted, authentication_flow, enrollment_flow, user_property_mappings, group_property_mappings, policy_engine_mode, user_matching_mode, user_path_template, icon, group_matching_mode, pre_authentication_flow, issuer, sso_url, slo_url, allow_idp_initiated, force_authn, name_id_policy, binding_type, verification_kp, signing_kp, digest_algorithm, signature_algorithm, temporary_user_delete_after, encryption_kp, signed_assertion, signed_response].hash
506
+ [name, slug, enabled, promoted, authentication_flow, enrollment_flow, user_property_mappings, group_property_mappings, policy_engine_mode, user_matching_mode, user_path_template, icon, group_matching_mode, pre_authentication_flow, issuer_override, sso_url, slo_url, allow_idp_initiated, force_authn, name_id_policy, binding_type, verification_kp, signing_kp, digest_algorithm, signature_algorithm, temporary_user_delete_after, encryption_kp, signed_assertion, signed_response].hash
507
507
  end
508
508
 
509
509
  # Builds the object from hash
@@ -13,6 +13,9 @@ module Authentik::Api
13
13
  # Configure how authentik should show avatars for users.
14
14
  attr_accessor :avatars
15
15
 
16
+ # Configure the base URL under which this authentik instance is reachable, e.g. https://authentik.company
17
+ attr_accessor :base_url
18
+
16
19
  # Enable the ability for users to change their name.
17
20
  attr_accessor :default_user_change_name
18
21
 
@@ -60,6 +63,7 @@ module Authentik::Api
60
63
  def self.attribute_map
61
64
  {
62
65
  :'avatars' => :'avatars',
66
+ :'base_url' => :'base_url',
63
67
  :'default_user_change_name' => :'default_user_change_name',
64
68
  :'default_user_change_email' => :'default_user_change_email',
65
69
  :'default_user_change_username' => :'default_user_change_username',
@@ -92,6 +96,7 @@ module Authentik::Api
92
96
  def self.openapi_types
93
97
  {
94
98
  :'avatars' => :'String',
99
+ :'base_url' => :'String',
95
100
  :'default_user_change_name' => :'Boolean',
96
101
  :'default_user_change_email' => :'Boolean',
97
102
  :'default_user_change_username' => :'Boolean',
@@ -137,6 +142,10 @@ module Authentik::Api
137
142
  self.avatars = attributes[:'avatars']
138
143
  end
139
144
 
145
+ if attributes.key?(:'base_url')
146
+ self.base_url = attributes[:'base_url']
147
+ end
148
+
140
149
  if attributes.key?(:'default_user_change_name')
141
150
  self.default_user_change_name = attributes[:'default_user_change_name']
142
151
  end
@@ -207,6 +216,10 @@ module Authentik::Api
207
216
  invalid_properties.push('invalid value for "avatars", the character length must be greater than or equal to 1.')
208
217
  end
209
218
 
219
+ if !@base_url.nil? && @base_url.to_s.length > 200
220
+ invalid_properties.push('invalid value for "base_url", the character length must be smaller than or equal to 200.')
221
+ end
222
+
210
223
  if !@event_retention.nil? && @event_retention.to_s.length < 1
211
224
  invalid_properties.push('invalid value for "event_retention", the character length must be greater than or equal to 1.')
212
225
  end
@@ -263,6 +276,7 @@ module Authentik::Api
263
276
  def valid?
264
277
  warn '[DEPRECATED] the `valid?` method is obsolete'
265
278
  return false if !@avatars.nil? && @avatars.to_s.length < 1
279
+ return false if !@base_url.nil? && @base_url.to_s.length > 200
266
280
  return false if !@event_retention.nil? && @event_retention.to_s.length < 1
267
281
  return false if !@reputation_lower_limit.nil? && @reputation_lower_limit > 0
268
282
  return false if !@reputation_lower_limit.nil? && @reputation_lower_limit < -2147483648
@@ -292,6 +306,20 @@ module Authentik::Api
292
306
  @avatars = avatars
293
307
  end
294
308
 
309
+ # Custom attribute writer method with validation
310
+ # @param [Object] base_url Value to be assigned
311
+ def base_url=(base_url)
312
+ if base_url.nil?
313
+ fail ArgumentError, 'base_url cannot be nil'
314
+ end
315
+
316
+ if base_url.to_s.length > 200
317
+ fail ArgumentError, 'invalid value for "base_url", the character length must be smaller than or equal to 200.'
318
+ end
319
+
320
+ @base_url = base_url
321
+ end
322
+
295
323
  # Custom attribute writer method with validation
296
324
  # @param [Object] event_retention Value to be assigned
297
325
  def event_retention=(event_retention)
@@ -416,6 +444,7 @@ module Authentik::Api
416
444
  return true if self.equal?(o)
417
445
  self.class == o.class &&
418
446
  avatars == o.avatars &&
447
+ base_url == o.base_url &&
419
448
  default_user_change_name == o.default_user_change_name &&
420
449
  default_user_change_email == o.default_user_change_email &&
421
450
  default_user_change_username == o.default_user_change_username &&
@@ -442,7 +471,7 @@ module Authentik::Api
442
471
  # Calculates hash code according to all attributes.
443
472
  # @return [Integer] Hash code
444
473
  def hash
445
- [avatars, default_user_change_name, default_user_change_email, default_user_change_username, event_retention, reputation_lower_limit, reputation_upper_limit, footer_links, gdpr_compliance, impersonation, impersonation_require_reason, default_token_duration, default_token_length, pagination_default_page_size, pagination_max_page_size, flags].hash
474
+ [avatars, base_url, default_user_change_name, default_user_change_email, default_user_change_username, event_retention, reputation_lower_limit, reputation_upper_limit, footer_links, gdpr_compliance, impersonation, impersonation_require_reason, default_token_duration, default_token_length, pagination_default_page_size, pagination_max_page_size, flags].hash
446
475
  end
447
476
 
448
477
  # Builds the object from hash
@@ -9,7 +9,7 @@ require 'time'
9
9
 
10
10
  module Authentik::Api
11
11
  class PatchedSettingsRequestFlags < ApiModelBase
12
- # Configure if applications without any policy/group/user bindings should be accessible to any user.
12
+ # Applications with no policies bound can be accessed by any user.
13
13
  attr_accessor :core_default_app_access
14
14
 
15
15
  # Include additional information in audit logs, may incur a performance penalty.
@@ -42,6 +42,9 @@ module Authentik::Api
42
42
  # Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate.
43
43
  attr_accessor :authn_context_class_ref_mapping
44
44
 
45
+ # SAML assertion version to issue in the security token. Microsoft Entra ID and classic ADFS-style relying parties typically require SAML 1.1.
46
+ attr_accessor :saml_version
47
+
45
48
  attr_accessor :digest_algorithm
46
49
 
47
50
  attr_accessor :signature_algorithm
@@ -95,6 +98,7 @@ module Authentik::Api
95
98
  :'session_valid_not_on_or_after' => :'session_valid_not_on_or_after',
96
99
  :'name_id_mapping' => :'name_id_mapping',
97
100
  :'authn_context_class_ref_mapping' => :'authn_context_class_ref_mapping',
101
+ :'saml_version' => :'saml_version',
98
102
  :'digest_algorithm' => :'digest_algorithm',
99
103
  :'signature_algorithm' => :'signature_algorithm',
100
104
  :'signing_kp' => :'signing_kp',
@@ -130,6 +134,7 @@ module Authentik::Api
130
134
  :'session_valid_not_on_or_after' => :'String',
131
135
  :'name_id_mapping' => :'String',
132
136
  :'authn_context_class_ref_mapping' => :'String',
137
+ :'saml_version' => :'SamlVersionEnum',
133
138
  :'digest_algorithm' => :'DigestAlgorithmEnum',
134
139
  :'signature_algorithm' => :'SignatureAlgorithmEnum',
135
140
  :'signing_kp' => :'String',
@@ -217,6 +222,10 @@ module Authentik::Api
217
222
  self.authn_context_class_ref_mapping = attributes[:'authn_context_class_ref_mapping']
218
223
  end
219
224
 
225
+ if attributes.key?(:'saml_version')
226
+ self.saml_version = attributes[:'saml_version']
227
+ end
228
+
220
229
  if attributes.key?(:'digest_algorithm')
221
230
  self.digest_algorithm = attributes[:'digest_algorithm']
222
231
  end
@@ -392,6 +401,7 @@ module Authentik::Api
392
401
  session_valid_not_on_or_after == o.session_valid_not_on_or_after &&
393
402
  name_id_mapping == o.name_id_mapping &&
394
403
  authn_context_class_ref_mapping == o.authn_context_class_ref_mapping &&
404
+ saml_version == o.saml_version &&
395
405
  digest_algorithm == o.digest_algorithm &&
396
406
  signature_algorithm == o.signature_algorithm &&
397
407
  signing_kp == o.signing_kp &&
@@ -410,7 +420,7 @@ module Authentik::Api
410
420
  # Calculates hash code according to all attributes.
411
421
  # @return [Integer] Hash code
412
422
  def hash
413
- [name, authentication_flow, authorization_flow, invalidation_flow, property_mappings, reply_url, wtrealm, assertion_valid_not_before, assertion_valid_not_on_or_after, session_valid_not_on_or_after, name_id_mapping, authn_context_class_ref_mapping, digest_algorithm, signature_algorithm, signing_kp, encryption_kp, sign_assertion, sign_logout_request, default_name_id_policy].hash
423
+ [name, authentication_flow, authorization_flow, invalidation_flow, property_mappings, reply_url, wtrealm, assertion_valid_not_before, assertion_valid_not_on_or_after, session_valid_not_on_or_after, name_id_mapping, authn_context_class_ref_mapping, saml_version, digest_algorithm, signature_algorithm, signing_kp, encryption_kp, sign_assertion, sign_logout_request, default_name_id_policy].hash
414
424
  end
415
425
 
416
426
  # Builds the object from hash
@@ -39,6 +39,10 @@ module Authentik::Api
39
39
  # Result if the Policy execution fails.
40
40
  attr_accessor :failure_result
41
41
 
42
+ attr_accessor :expires
43
+
44
+ attr_accessor :expiring
45
+
42
46
  # Attribute mapping from ruby-style variable name to JSON key.
43
47
  def self.attribute_map
44
48
  {
@@ -54,7 +58,9 @@ module Authentik::Api
54
58
  :'enabled' => :'enabled',
55
59
  :'order' => :'order',
56
60
  :'timeout' => :'timeout',
57
- :'failure_result' => :'failure_result'
61
+ :'failure_result' => :'failure_result',
62
+ :'expires' => :'expires',
63
+ :'expiring' => :'expiring'
58
64
  }
59
65
  end
60
66
 
@@ -83,7 +89,9 @@ module Authentik::Api
83
89
  :'enabled' => :'Boolean',
84
90
  :'order' => :'Integer',
85
91
  :'timeout' => :'Integer',
86
- :'failure_result' => :'Boolean'
92
+ :'failure_result' => :'Boolean',
93
+ :'expires' => :'Time',
94
+ :'expiring' => :'Boolean'
87
95
  }
88
96
  end
89
97
 
@@ -96,6 +104,7 @@ module Authentik::Api
96
104
  :'policy_obj',
97
105
  :'group_obj',
98
106
  :'user_obj',
107
+ :'expires',
99
108
  ])
100
109
  end
101
110
 
@@ -178,6 +187,18 @@ module Authentik::Api
178
187
  if attributes.key?(:'failure_result')
179
188
  self.failure_result = attributes[:'failure_result']
180
189
  end
190
+
191
+ if attributes.key?(:'expires')
192
+ self.expires = attributes[:'expires']
193
+ else
194
+ self.expires = nil
195
+ end
196
+
197
+ if attributes.key?(:'expiring')
198
+ self.expiring = attributes[:'expiring']
199
+ else
200
+ self.expiring = nil
201
+ end
181
202
  end
182
203
 
183
204
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -213,6 +234,10 @@ module Authentik::Api
213
234
  invalid_properties.push('invalid value for "timeout", must be greater than or equal to 0.')
214
235
  end
215
236
 
237
+ if @expiring.nil?
238
+ invalid_properties.push('invalid value for "expiring", expiring cannot be nil.')
239
+ end
240
+
216
241
  invalid_properties
217
242
  end
218
243
 
@@ -227,6 +252,7 @@ module Authentik::Api
227
252
  return false if @order < -2147483648
228
253
  return false if !@timeout.nil? && @timeout > 2147483647
229
254
  return false if !@timeout.nil? && @timeout < 0
255
+ return false if @expiring.nil?
230
256
  true
231
257
  end
232
258
 
@@ -286,6 +312,16 @@ module Authentik::Api
286
312
  @timeout = timeout
287
313
  end
288
314
 
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] expiring Value to be assigned
317
+ def expiring=(expiring)
318
+ if expiring.nil?
319
+ fail ArgumentError, 'expiring cannot be nil'
320
+ end
321
+
322
+ @expiring = expiring
323
+ end
324
+
289
325
  # Checks equality by comparing each attribute.
290
326
  # @param [Object] Object to be compared
291
327
  def ==(o)
@@ -303,7 +339,9 @@ module Authentik::Api
303
339
  enabled == o.enabled &&
304
340
  order == o.order &&
305
341
  timeout == o.timeout &&
306
- failure_result == o.failure_result
342
+ failure_result == o.failure_result &&
343
+ expires == o.expires &&
344
+ expiring == o.expiring
307
345
  end
308
346
 
309
347
  # @see the `==` method
@@ -315,7 +353,7 @@ module Authentik::Api
315
353
  # Calculates hash code according to all attributes.
316
354
  # @return [Integer] Hash code
317
355
  def hash
318
- [pk, policy, group, user, policy_obj, group_obj, user_obj, target, negate, enabled, order, timeout, failure_result].hash
356
+ [pk, policy, group, user, policy_obj, group_obj, user_obj, target, negate, enabled, order, timeout, failure_result, expires, expiring].hash
319
357
  end
320
358
 
321
359
  # Builds the object from hash
@@ -11,9 +11,8 @@ module Authentik::Api
11
11
  class ProviderTypeEnum
12
12
  OPENIDCONNECT = "openidconnect".freeze
13
13
  APPLE = "apple".freeze
14
- ENTRAID = "entraid".freeze
15
- AZUREAD = "azuread".freeze
16
14
  DISCORD = "discord".freeze
15
+ ENTRAID = "entraid".freeze
17
16
  FACEBOOK = "facebook".freeze
18
17
  GITHUB = "github".freeze
19
18
  GITLAB = "gitlab".freeze
@@ -28,7 +27,7 @@ module Authentik::Api
28
27
  WECHAT = "wechat".freeze
29
28
 
30
29
  def self.all_vars
31
- @all_vars ||= [OPENIDCONNECT, APPLE, ENTRAID, AZUREAD, DISCORD, FACEBOOK, GITHUB, GITLAB, GOOGLE, MAILCOW, OKTA, PATREON, REDDIT, SLACK, TWITCH, TWITTER, WECHAT].freeze
30
+ @all_vars ||= [OPENIDCONNECT, APPLE, DISCORD, ENTRAID, FACEBOOK, GITHUB, GITLAB, GOOGLE, MAILCOW, OKTA, PATREON, REDDIT, SLACK, TWITCH, TWITTER, WECHAT].freeze
32
31
  end
33
32
 
34
33
  # Builds the enum from string
@@ -46,9 +46,9 @@ module Authentik::Api
46
46
  {
47
47
  :'id' => :'String',
48
48
  :'name' => :'String',
49
- :'reviewer_groups' => :'Array<ReviewerGroup>',
49
+ :'reviewer_groups' => :'Array<PartialGroup>',
50
50
  :'min_reviewers' => :'Integer',
51
- :'reviewers' => :'Array<ReviewerUser>'
51
+ :'reviewers' => :'Array<PartialUser>'
52
52
  }
53
53
  end
54
54
 
@@ -0,0 +1,266 @@
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
+ # Simplified related target object
12
+ class RelatedTarget < ApiModelBase
13
+ # Return object's verbose_name
14
+ attr_accessor :verbose_name
15
+
16
+ # Return object's plural verbose_name
17
+ attr_accessor :verbose_name_plural
18
+
19
+ # Return internal model name
20
+ attr_accessor :meta_model_name
21
+
22
+ attr_accessor :pbm_uuid
23
+
24
+ attr_accessor :label
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'verbose_name' => :'verbose_name',
30
+ :'verbose_name_plural' => :'verbose_name_plural',
31
+ :'meta_model_name' => :'meta_model_name',
32
+ :'pbm_uuid' => :'pbm_uuid',
33
+ :'label' => :'label'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'verbose_name' => :'String',
51
+ :'verbose_name_plural' => :'String',
52
+ :'meta_model_name' => :'String',
53
+ :'pbm_uuid' => :'String',
54
+ :'label' => :'String'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::RelatedTarget` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::RelatedTarget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'verbose_name')
81
+ self.verbose_name = attributes[:'verbose_name']
82
+ else
83
+ self.verbose_name = nil
84
+ end
85
+
86
+ if attributes.key?(:'verbose_name_plural')
87
+ self.verbose_name_plural = attributes[:'verbose_name_plural']
88
+ else
89
+ self.verbose_name_plural = nil
90
+ end
91
+
92
+ if attributes.key?(:'meta_model_name')
93
+ self.meta_model_name = attributes[:'meta_model_name']
94
+ else
95
+ self.meta_model_name = nil
96
+ end
97
+
98
+ if attributes.key?(:'pbm_uuid')
99
+ self.pbm_uuid = attributes[:'pbm_uuid']
100
+ else
101
+ self.pbm_uuid = nil
102
+ end
103
+
104
+ if attributes.key?(:'label')
105
+ self.label = attributes[:'label']
106
+ else
107
+ self.label = nil
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ if @verbose_name.nil?
117
+ invalid_properties.push('invalid value for "verbose_name", verbose_name cannot be nil.')
118
+ end
119
+
120
+ if @verbose_name_plural.nil?
121
+ invalid_properties.push('invalid value for "verbose_name_plural", verbose_name_plural cannot be nil.')
122
+ end
123
+
124
+ if @meta_model_name.nil?
125
+ invalid_properties.push('invalid value for "meta_model_name", meta_model_name cannot be nil.')
126
+ end
127
+
128
+ if @pbm_uuid.nil?
129
+ invalid_properties.push('invalid value for "pbm_uuid", pbm_uuid cannot be nil.')
130
+ end
131
+
132
+ if @label.nil?
133
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
134
+ end
135
+
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ return false if @verbose_name.nil?
144
+ return false if @verbose_name_plural.nil?
145
+ return false if @meta_model_name.nil?
146
+ return false if @pbm_uuid.nil?
147
+ return false if @label.nil?
148
+ true
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] verbose_name Value to be assigned
153
+ def verbose_name=(verbose_name)
154
+ if verbose_name.nil?
155
+ fail ArgumentError, 'verbose_name cannot be nil'
156
+ end
157
+
158
+ @verbose_name = verbose_name
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] verbose_name_plural Value to be assigned
163
+ def verbose_name_plural=(verbose_name_plural)
164
+ if verbose_name_plural.nil?
165
+ fail ArgumentError, 'verbose_name_plural cannot be nil'
166
+ end
167
+
168
+ @verbose_name_plural = verbose_name_plural
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param [Object] meta_model_name Value to be assigned
173
+ def meta_model_name=(meta_model_name)
174
+ if meta_model_name.nil?
175
+ fail ArgumentError, 'meta_model_name cannot be nil'
176
+ end
177
+
178
+ @meta_model_name = meta_model_name
179
+ end
180
+
181
+ # Custom attribute writer method with validation
182
+ # @param [Object] pbm_uuid Value to be assigned
183
+ def pbm_uuid=(pbm_uuid)
184
+ if pbm_uuid.nil?
185
+ fail ArgumentError, 'pbm_uuid cannot be nil'
186
+ end
187
+
188
+ @pbm_uuid = pbm_uuid
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] label Value to be assigned
193
+ def label=(label)
194
+ if label.nil?
195
+ fail ArgumentError, 'label cannot be nil'
196
+ end
197
+
198
+ @label = label
199
+ end
200
+
201
+ # Checks equality by comparing each attribute.
202
+ # @param [Object] Object to be compared
203
+ def ==(o)
204
+ return true if self.equal?(o)
205
+ self.class == o.class &&
206
+ verbose_name == o.verbose_name &&
207
+ verbose_name_plural == o.verbose_name_plural &&
208
+ meta_model_name == o.meta_model_name &&
209
+ pbm_uuid == o.pbm_uuid &&
210
+ label == o.label
211
+ end
212
+
213
+ # @see the `==` method
214
+ # @param [Object] Object to be compared
215
+ def eql?(o)
216
+ self == o
217
+ end
218
+
219
+ # Calculates hash code according to all attributes.
220
+ # @return [Integer] Hash code
221
+ def hash
222
+ [verbose_name, verbose_name_plural, meta_model_name, pbm_uuid, label].hash
223
+ end
224
+
225
+ # Builds the object from hash
226
+ # @param [Hash] attributes Model attributes in the form of hash
227
+ # @return [Object] Returns the model itself
228
+ def self.build_from_hash(attributes)
229
+ return nil unless attributes.is_a?(Hash)
230
+ attributes = attributes.transform_keys(&:to_sym)
231
+ transformed_hash = {}
232
+ openapi_types.each_pair do |key, type|
233
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
234
+ transformed_hash["#{key}"] = nil
235
+ elsif type =~ /\AArray<(.*)>/i
236
+ # check to ensure the input is an array given that the attribute
237
+ # is documented as an array but the input is not
238
+ if attributes[attribute_map[key]].is_a?(Array)
239
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
240
+ end
241
+ elsif !attributes[attribute_map[key]].nil?
242
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
243
+ end
244
+ end
245
+ new(transformed_hash)
246
+ end
247
+
248
+ # Returns the object in the form of hash
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_hash
251
+ hash = {}
252
+ self.class.attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -0,0 +1,34 @@
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
+ class RequestContentTypeEnum
12
+ APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded".freeze
13
+ APPLICATION_JSON = "application/json".freeze
14
+
15
+ def self.all_vars
16
+ @all_vars ||= [APPLICATION_X_WWW_FORM_URLENCODED, APPLICATION_JSON].freeze
17
+ end
18
+
19
+ # Builds the enum from string
20
+ # @param [String] The enum value in the form of the string
21
+ # @return [String] The enum value
22
+ def self.build_from_hash(value)
23
+ new.build_from_hash(value)
24
+ end
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def build_from_hash(value)
30
+ return value if RequestContentTypeEnum.all_vars.include?(value)
31
+ raise "Invalid ENUM value #{value} for class #RequestContentTypeEnum"
32
+ end
33
+ end
34
+ end