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.
- checksums.yaml +4 -4
- data/README_API.md +105 -9
- data/lib/authentik/api/api/admin_api.rb +3 -0
- data/lib/authentik/api/api/core_api.rb +651 -27
- data/lib/authentik/api/api/endpoints_api.rb +7 -7
- data/lib/authentik/api/api/events_api.rb +35 -2
- data/lib/authentik/api/api/lifecycle_api.rb +258 -0
- data/lib/authentik/api/api/providers_api.rb +401 -0
- data/lib/authentik/api/api/requests_api.rb +1858 -0
- data/lib/authentik/api/api/sources_api.rb +6 -3
- data/lib/authentik/api/configuration.rb +14 -0
- data/lib/authentik/api/inflector.rb +2 -1
- data/lib/authentik/api/models/app_enum.rb +3 -1
- data/lib/authentik/api/models/application.rb +27 -1
- data/lib/authentik/api/models/authenticator_web_authn_stage.rb +1 -11
- data/lib/authentik/api/models/authenticator_web_authn_stage_request.rb +1 -11
- data/lib/authentik/api/models/brand.rb +21 -1
- data/lib/authentik/api/models/brand_request.rb +21 -1
- data/lib/authentik/api/models/captcha_stage.rb +32 -1
- data/lib/authentik/api/models/captcha_stage_request.rb +32 -1
- data/lib/authentik/api/models/compatibility_mode_enum.rb +2 -1
- data/lib/authentik/api/models/content_type.rb +30 -4
- data/lib/authentik/api/models/current_brand.rb +19 -1
- data/lib/authentik/api/models/current_brand_flags.rb +1 -55
- data/lib/authentik/api/models/device_user_binding.rb +39 -1
- data/lib/authentik/api/models/event_actions.rb +6 -1
- data/lib/authentik/api/models/grant_request.rb +382 -0
- data/lib/authentik/api/models/{reviewer_group.rb → grant_request_create_request.rb} +29 -42
- data/lib/authentik/api/models/{grant_types_enum.rb → grant_type_enum.rb} +5 -4
- data/lib/authentik/api/models/last_task_status_enum.rb +2 -1
- data/lib/authentik/api/models/ldap_outpost_config.rb +1 -1
- data/lib/authentik/api/models/ldap_source.rb +14 -4
- data/lib/authentik/api/models/ldap_source_request.rb +14 -4
- data/lib/authentik/api/models/lifecycle_rule.rb +2 -2
- data/lib/authentik/api/models/model_enum.rb +8 -1
- data/lib/authentik/api/models/notification_mode_enum.rb +35 -0
- data/lib/authentik/api/models/o_auth2_dynamic_client_registration.rb +291 -0
- data/lib/authentik/api/models/o_auth2_dynamic_client_registration_request.rb +303 -0
- data/lib/authentik/api/models/o_auth2_provider.rb +1 -1
- data/lib/authentik/api/models/o_auth2_provider_request.rb +1 -1
- data/lib/authentik/api/models/o_auth_source.rb +0 -60
- data/lib/authentik/api/models/o_auth_source_request.rb +0 -60
- data/lib/authentik/api/models/object_attribute.rb +420 -0
- data/lib/authentik/api/models/object_attribute_request.rb +358 -0
- data/lib/authentik/api/models/object_attribute_type_enum.rb +35 -0
- data/lib/authentik/api/models/offboarding_action_enum.rb +34 -0
- data/lib/authentik/api/models/offboarding_status_enum.rb +36 -0
- data/lib/authentik/api/models/paginated_grant_request_list.rb +214 -0
- data/lib/authentik/api/models/paginated_o_auth2_dynamic_client_registration_list.rb +214 -0
- data/lib/authentik/api/models/paginated_object_attribute_list.rb +214 -0
- data/lib/authentik/api/models/paginated_request_rule_binding_list.rb +214 -0
- data/lib/authentik/api/models/paginated_request_rule_child_binding_list.rb +214 -0
- data/lib/authentik/api/models/paginated_request_rule_list.rb +214 -0
- data/lib/authentik/api/models/paginated_requestable_target_list.rb +214 -0
- data/lib/authentik/api/models/paginated_user_offboarding_list.rb +214 -0
- data/lib/authentik/api/models/patched_authenticator_web_authn_stage_request.rb +1 -11
- data/lib/authentik/api/models/patched_brand_request.rb +21 -1
- data/lib/authentik/api/models/patched_captcha_stage_request.rb +32 -1
- data/lib/authentik/api/models/patched_grant_request_fulfill_request.rb +175 -0
- data/lib/authentik/api/models/patched_ldap_source_request.rb +14 -4
- data/lib/authentik/api/models/patched_o_auth2_dynamic_client_registration_request.rb +286 -0
- data/lib/authentik/api/models/patched_o_auth2_provider_request.rb +1 -1
- data/lib/authentik/api/models/patched_o_auth_source_request.rb +0 -60
- data/lib/authentik/api/models/patched_object_attribute_request.rb +320 -0
- data/lib/authentik/api/models/patched_request_rule_binding_request.rb +249 -0
- data/lib/authentik/api/models/patched_request_rule_child_binding_request.rb +159 -0
- data/lib/authentik/api/models/patched_request_rule_request.rb +277 -0
- data/lib/authentik/api/models/patched_saml_source_request.rb +8 -8
- data/lib/authentik/api/models/patched_settings_request.rb +30 -1
- data/lib/authentik/api/models/patched_settings_request_flags.rb +1 -1
- data/lib/authentik/api/models/patched_ws_federation_provider_request.rb +11 -1
- data/lib/authentik/api/models/policy_binding.rb +42 -4
- data/lib/authentik/api/models/provider_type_enum.rb +2 -3
- data/lib/authentik/api/models/related_rule.rb +2 -2
- data/lib/authentik/api/models/related_target.rb +266 -0
- data/lib/authentik/api/models/request_content_type_enum.rb +34 -0
- data/lib/authentik/api/models/request_rule.rb +329 -0
- data/lib/authentik/api/models/request_rule_binding.rb +353 -0
- data/lib/authentik/api/models/request_rule_binding_request.rb +283 -0
- data/lib/authentik/api/models/{reviewer_user.rb → request_rule_child_binding.rb} +34 -99
- data/lib/authentik/api/models/request_rule_child_binding_request.rb +193 -0
- data/lib/authentik/api/models/request_rule_request.rb +284 -0
- data/lib/authentik/api/models/request_status.rb +36 -0
- data/lib/authentik/api/models/requestable_target.rb +278 -0
- data/lib/authentik/api/models/review.rb +1 -1
- data/lib/authentik/api/models/saml_source.rb +35 -8
- data/lib/authentik/api/models/saml_source_request.rb +8 -8
- data/lib/authentik/api/models/saml_version_enum.rb +34 -0
- data/lib/authentik/api/models/session_user.rb +32 -4
- data/lib/authentik/api/models/settings.rb +30 -1
- data/lib/authentik/api/models/settings_request.rb +30 -1
- data/lib/authentik/api/models/system_info.rb +31 -4
- data/lib/authentik/api/models/task_aggregated_status_enum.rb +2 -1
- data/lib/authentik/api/models/task_status_enum.rb +2 -1
- data/lib/authentik/api/models/user_offboarding.rb +379 -0
- data/lib/authentik/api/models/user_offboarding_request.rb +237 -0
- data/lib/authentik/api/models/user_self.rb +28 -1
- data/lib/authentik/api/models/user_switch_action_enum.rb +34 -0
- data/lib/authentik/api/models/user_switch_request.rb +173 -0
- data/lib/authentik/api/models/user_switch_response.rb +159 -0
- data/lib/authentik/api/models/ws_federation_provider.rb +41 -4
- data/lib/authentik/api/models/ws_federation_provider_request.rb +11 -1
- data/lib/authentik/api/version.rb +1 -1
- data/spec/api/admin_api_spec.rb +1 -0
- data/spec/api/core_api_spec.rb +119 -0
- data/spec/api/events_api_spec.rb +11 -0
- data/spec/api/lifecycle_api_spec.rb +47 -0
- data/spec/api/providers_api_spec.rb +73 -0
- data/spec/api/requests_api_spec.rb +365 -0
- data/spec/api/sources_api_spec.rb +2 -1
- data/spec/models/application_spec.rb +6 -0
- data/spec/models/authenticator_web_authn_stage_request_spec.rb +0 -6
- data/spec/models/authenticator_web_authn_stage_spec.rb +0 -6
- data/spec/models/brand_request_spec.rb +12 -0
- data/spec/models/brand_spec.rb +12 -0
- data/spec/models/captcha_stage_request_spec.rb +6 -0
- data/spec/models/captcha_stage_spec.rb +6 -0
- data/spec/models/content_type_spec.rb +6 -0
- data/spec/models/current_brand_flags_spec.rb +0 -12
- data/spec/models/current_brand_spec.rb +12 -0
- data/spec/models/device_user_binding_spec.rb +12 -0
- data/spec/models/grant_request_create_request_spec.rb +36 -0
- data/spec/models/grant_request_spec.rb +90 -0
- data/spec/models/{grant_types_enum_spec.rb → grant_type_enum_spec.rb} +6 -6
- data/spec/models/ldap_source_request_spec.rb +6 -0
- data/spec/models/ldap_source_spec.rb +6 -0
- data/spec/models/notification_mode_enum_spec.rb +24 -0
- data/spec/models/o_auth2_dynamic_client_registration_request_spec.rb +78 -0
- data/spec/models/o_auth2_dynamic_client_registration_spec.rb +84 -0
- data/spec/models/object_attribute_request_spec.rb +84 -0
- data/spec/models/object_attribute_spec.rb +108 -0
- data/spec/models/object_attribute_type_enum_spec.rb +24 -0
- data/spec/models/offboarding_action_enum_spec.rb +24 -0
- data/spec/models/offboarding_status_enum_spec.rb +24 -0
- data/spec/models/paginated_grant_request_list_spec.rb +42 -0
- data/spec/models/paginated_o_auth2_dynamic_client_registration_list_spec.rb +42 -0
- data/spec/models/paginated_object_attribute_list_spec.rb +42 -0
- data/spec/models/paginated_request_rule_binding_list_spec.rb +42 -0
- data/spec/models/paginated_request_rule_child_binding_list_spec.rb +42 -0
- data/spec/models/paginated_request_rule_list_spec.rb +42 -0
- data/spec/models/paginated_requestable_target_list_spec.rb +42 -0
- data/spec/models/paginated_user_offboarding_list_spec.rb +42 -0
- data/spec/models/patched_authenticator_web_authn_stage_request_spec.rb +0 -6
- data/spec/models/patched_brand_request_spec.rb +12 -0
- data/spec/models/patched_captcha_stage_request_spec.rb +6 -0
- data/spec/models/patched_grant_request_fulfill_request_spec.rb +36 -0
- data/spec/models/patched_ldap_source_request_spec.rb +6 -0
- data/spec/models/patched_o_auth2_dynamic_client_registration_request_spec.rb +78 -0
- data/spec/models/patched_object_attribute_request_spec.rb +84 -0
- data/spec/models/patched_request_rule_binding_request_spec.rb +60 -0
- data/spec/models/patched_request_rule_child_binding_request_spec.rb +42 -0
- data/spec/models/patched_request_rule_request_spec.rb +72 -0
- data/spec/models/patched_saml_source_request_spec.rb +1 -1
- data/spec/models/patched_settings_request_spec.rb +6 -0
- data/spec/models/patched_ws_federation_provider_request_spec.rb +6 -0
- data/spec/models/policy_binding_spec.rb +12 -0
- data/spec/models/related_target_spec.rb +54 -0
- data/spec/models/request_content_type_enum_spec.rb +24 -0
- data/spec/models/request_rule_binding_request_spec.rb +60 -0
- data/spec/models/request_rule_binding_spec.rb +84 -0
- data/spec/models/request_rule_child_binding_request_spec.rb +42 -0
- data/spec/models/{reviewer_user_spec.rb → request_rule_child_binding_spec.rb} +8 -14
- data/spec/models/request_rule_request_spec.rb +72 -0
- data/spec/models/request_rule_spec.rb +84 -0
- data/spec/models/request_status_spec.rb +24 -0
- data/spec/models/requestable_target_spec.rb +60 -0
- data/spec/models/saml_source_request_spec.rb +1 -1
- data/spec/models/saml_source_spec.rb +7 -1
- data/spec/models/saml_version_enum_spec.rb +24 -0
- data/spec/models/session_user_spec.rb +6 -0
- data/spec/models/settings_request_spec.rb +6 -0
- data/spec/models/settings_spec.rb +6 -0
- data/spec/models/system_info_spec.rb +6 -0
- data/spec/models/user_offboarding_request_spec.rb +54 -0
- data/spec/models/user_offboarding_spec.rb +90 -0
- data/spec/models/user_self_spec.rb +6 -0
- data/spec/models/user_switch_action_enum_spec.rb +24 -0
- data/spec/models/{reviewer_group_spec.rb → user_switch_request_spec.rb} +8 -8
- data/spec/models/user_switch_response_spec.rb +30 -0
- data/spec/models/ws_federation_provider_request_spec.rb +6 -0
- data/spec/models/ws_federation_provider_spec.rb +12 -0
- metadata +127 -10
|
@@ -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 UserSwitchActionEnum
|
|
12
|
+
ADD = "add".freeze
|
|
13
|
+
SWITCH = "switch".freeze
|
|
14
|
+
|
|
15
|
+
def self.all_vars
|
|
16
|
+
@all_vars ||= [ADD, SWITCH].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 UserSwitchActionEnum.all_vars.include?(value)
|
|
31
|
+
raise "Invalid ENUM value #{value} for class #UserSwitchActionEnum"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
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
|
+
# Request to add or switch users in the current browser.
|
|
12
|
+
class UserSwitchRequest < ApiModelBase
|
|
13
|
+
attr_accessor :action
|
|
14
|
+
|
|
15
|
+
attr_accessor :user_pk
|
|
16
|
+
|
|
17
|
+
class EnumAttributeValidator
|
|
18
|
+
attr_reader :datatype
|
|
19
|
+
attr_reader :allowable_values
|
|
20
|
+
|
|
21
|
+
def initialize(datatype, allowable_values)
|
|
22
|
+
@allowable_values = allowable_values.map do |value|
|
|
23
|
+
case datatype.to_s
|
|
24
|
+
when /Integer/i
|
|
25
|
+
value.to_i
|
|
26
|
+
when /Float/i
|
|
27
|
+
value.to_f
|
|
28
|
+
else
|
|
29
|
+
value
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def valid?(value)
|
|
35
|
+
!value || allowable_values.include?(value)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'action' => :'action',
|
|
43
|
+
:'user_pk' => :'user_pk'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Returns attribute mapping this model knows about
|
|
48
|
+
def self.acceptable_attribute_map
|
|
49
|
+
attribute_map
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
acceptable_attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'action' => :'UserSwitchActionEnum',
|
|
61
|
+
:'user_pk' => :'Integer'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::UserSwitchRequest` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::UserSwitchRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'action')
|
|
88
|
+
self.action = attributes[:'action']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'user_pk')
|
|
92
|
+
self.user_pk = attributes[:'user_pk']
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
invalid_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check to see if the all the properties in the model are valid
|
|
105
|
+
# @return true if the model is valid
|
|
106
|
+
def valid?
|
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
action == o.action &&
|
|
117
|
+
user_pk == o.user_pk
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @see the `==` method
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def eql?(o)
|
|
123
|
+
self == o
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
def hash
|
|
129
|
+
[action, user_pk].hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def self.build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
138
|
+
transformed_hash = {}
|
|
139
|
+
openapi_types.each_pair do |key, type|
|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = nil
|
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
|
+
# check to ensure the input is an array given that the attribute
|
|
144
|
+
# is documented as an array but the input is not
|
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
|
+
end
|
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
new(transformed_hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Returns the object in the form of hash
|
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
|
157
|
+
def to_hash
|
|
158
|
+
hash = {}
|
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
160
|
+
value = self.send(attr)
|
|
161
|
+
if value.nil?
|
|
162
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
163
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
hash[param] = _to_hash(value)
|
|
167
|
+
end
|
|
168
|
+
hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
# Redirect returned after planning a user switch.
|
|
12
|
+
class UserSwitchResponse < ApiModelBase
|
|
13
|
+
attr_accessor :redirect
|
|
14
|
+
|
|
15
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
16
|
+
def self.attribute_map
|
|
17
|
+
{
|
|
18
|
+
:'redirect' => :'redirect'
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Returns attribute mapping this model knows about
|
|
23
|
+
def self.acceptable_attribute_map
|
|
24
|
+
attribute_map
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns all the JSON keys this model knows about
|
|
28
|
+
def self.acceptable_attributes
|
|
29
|
+
acceptable_attribute_map.values
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Attribute type mapping.
|
|
33
|
+
def self.openapi_types
|
|
34
|
+
{
|
|
35
|
+
:'redirect' => :'String'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Initializes the object
|
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
if (!attributes.is_a?(Hash))
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::UserSwitchResponse` initialize method"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Authentik::Api::UserSwitchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'redirect')
|
|
62
|
+
self.redirect = attributes[:'redirect']
|
|
63
|
+
else
|
|
64
|
+
self.redirect = nil
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
|
+
# @return Array for valid properties with the reasons
|
|
70
|
+
def list_invalid_properties
|
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
72
|
+
invalid_properties = Array.new
|
|
73
|
+
if @redirect.nil?
|
|
74
|
+
invalid_properties.push('invalid value for "redirect", redirect cannot be nil.')
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
invalid_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Check to see if the all the properties in the model are valid
|
|
81
|
+
# @return true if the model is valid
|
|
82
|
+
def valid?
|
|
83
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
84
|
+
return false if @redirect.nil?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Custom attribute writer method with validation
|
|
89
|
+
# @param [Object] redirect Value to be assigned
|
|
90
|
+
def redirect=(redirect)
|
|
91
|
+
if redirect.nil?
|
|
92
|
+
fail ArgumentError, 'redirect cannot be nil'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
@redirect = redirect
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Checks equality by comparing each attribute.
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def ==(o)
|
|
101
|
+
return true if self.equal?(o)
|
|
102
|
+
self.class == o.class &&
|
|
103
|
+
redirect == o.redirect
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[redirect].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
new(transformed_hash)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the object in the form of hash
|
|
142
|
+
# @return [Hash] Returns the object in the form of hash
|
|
143
|
+
def to_hash
|
|
144
|
+
hash = {}
|
|
145
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
146
|
+
value = self.send(attr)
|
|
147
|
+
if value.nil?
|
|
148
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
149
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
hash[param] = _to_hash(value)
|
|
153
|
+
end
|
|
154
|
+
hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
|
@@ -68,6 +68,9 @@ module Authentik::Api
|
|
|
68
68
|
# 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.
|
|
69
69
|
attr_accessor :authn_context_class_ref_mapping
|
|
70
70
|
|
|
71
|
+
# SAML assertion version to issue in the security token. Microsoft Entra ID and classic ADFS-style relying parties typically require SAML 1.1.
|
|
72
|
+
attr_accessor :saml_version
|
|
73
|
+
|
|
71
74
|
attr_accessor :digest_algorithm
|
|
72
75
|
|
|
73
76
|
attr_accessor :signature_algorithm
|
|
@@ -90,6 +93,9 @@ module Authentik::Api
|
|
|
90
93
|
# Get WS-Fed url
|
|
91
94
|
attr_accessor :url_wsfed
|
|
92
95
|
|
|
96
|
+
# Get Issuer/EntityID URL
|
|
97
|
+
attr_accessor :url_issuer
|
|
98
|
+
|
|
93
99
|
class EnumAttributeValidator
|
|
94
100
|
attr_reader :datatype
|
|
95
101
|
attr_reader :allowable_values
|
|
@@ -136,6 +142,7 @@ module Authentik::Api
|
|
|
136
142
|
:'session_valid_not_on_or_after' => :'session_valid_not_on_or_after',
|
|
137
143
|
:'name_id_mapping' => :'name_id_mapping',
|
|
138
144
|
:'authn_context_class_ref_mapping' => :'authn_context_class_ref_mapping',
|
|
145
|
+
:'saml_version' => :'saml_version',
|
|
139
146
|
:'digest_algorithm' => :'digest_algorithm',
|
|
140
147
|
:'signature_algorithm' => :'signature_algorithm',
|
|
141
148
|
:'signing_kp' => :'signing_kp',
|
|
@@ -144,7 +151,8 @@ module Authentik::Api
|
|
|
144
151
|
:'sign_logout_request' => :'sign_logout_request',
|
|
145
152
|
:'default_name_id_policy' => :'default_name_id_policy',
|
|
146
153
|
:'url_download_metadata' => :'url_download_metadata',
|
|
147
|
-
:'url_wsfed' => :'url_wsfed'
|
|
154
|
+
:'url_wsfed' => :'url_wsfed',
|
|
155
|
+
:'url_issuer' => :'url_issuer'
|
|
148
156
|
}
|
|
149
157
|
end
|
|
150
158
|
|
|
@@ -182,6 +190,7 @@ module Authentik::Api
|
|
|
182
190
|
:'session_valid_not_on_or_after' => :'String',
|
|
183
191
|
:'name_id_mapping' => :'String',
|
|
184
192
|
:'authn_context_class_ref_mapping' => :'String',
|
|
193
|
+
:'saml_version' => :'SamlVersionEnum',
|
|
185
194
|
:'digest_algorithm' => :'DigestAlgorithmEnum',
|
|
186
195
|
:'signature_algorithm' => :'SignatureAlgorithmEnum',
|
|
187
196
|
:'signing_kp' => :'String',
|
|
@@ -190,7 +199,8 @@ module Authentik::Api
|
|
|
190
199
|
:'sign_logout_request' => :'Boolean',
|
|
191
200
|
:'default_name_id_policy' => :'SAMLNameIDPolicyEnum',
|
|
192
201
|
:'url_download_metadata' => :'String',
|
|
193
|
-
:'url_wsfed' => :'String'
|
|
202
|
+
:'url_wsfed' => :'String',
|
|
203
|
+
:'url_issuer' => :'String'
|
|
194
204
|
}
|
|
195
205
|
end
|
|
196
206
|
|
|
@@ -339,6 +349,10 @@ module Authentik::Api
|
|
|
339
349
|
self.authn_context_class_ref_mapping = attributes[:'authn_context_class_ref_mapping']
|
|
340
350
|
end
|
|
341
351
|
|
|
352
|
+
if attributes.key?(:'saml_version')
|
|
353
|
+
self.saml_version = attributes[:'saml_version']
|
|
354
|
+
end
|
|
355
|
+
|
|
342
356
|
if attributes.key?(:'digest_algorithm')
|
|
343
357
|
self.digest_algorithm = attributes[:'digest_algorithm']
|
|
344
358
|
end
|
|
@@ -378,6 +392,12 @@ module Authentik::Api
|
|
|
378
392
|
else
|
|
379
393
|
self.url_wsfed = nil
|
|
380
394
|
end
|
|
395
|
+
|
|
396
|
+
if attributes.key?(:'url_issuer')
|
|
397
|
+
self.url_issuer = attributes[:'url_issuer']
|
|
398
|
+
else
|
|
399
|
+
self.url_issuer = nil
|
|
400
|
+
end
|
|
381
401
|
end
|
|
382
402
|
|
|
383
403
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -433,6 +453,10 @@ module Authentik::Api
|
|
|
433
453
|
invalid_properties.push('invalid value for "url_wsfed", url_wsfed cannot be nil.')
|
|
434
454
|
end
|
|
435
455
|
|
|
456
|
+
if @url_issuer.nil?
|
|
457
|
+
invalid_properties.push('invalid value for "url_issuer", url_issuer cannot be nil.')
|
|
458
|
+
end
|
|
459
|
+
|
|
436
460
|
invalid_properties
|
|
437
461
|
end
|
|
438
462
|
|
|
@@ -452,6 +476,7 @@ module Authentik::Api
|
|
|
452
476
|
return false if @wtrealm.nil?
|
|
453
477
|
return false if @url_download_metadata.nil?
|
|
454
478
|
return false if @url_wsfed.nil?
|
|
479
|
+
return false if @url_issuer.nil?
|
|
455
480
|
true
|
|
456
481
|
end
|
|
457
482
|
|
|
@@ -575,6 +600,16 @@ module Authentik::Api
|
|
|
575
600
|
@url_wsfed = url_wsfed
|
|
576
601
|
end
|
|
577
602
|
|
|
603
|
+
# Custom attribute writer method with validation
|
|
604
|
+
# @param [Object] url_issuer Value to be assigned
|
|
605
|
+
def url_issuer=(url_issuer)
|
|
606
|
+
if url_issuer.nil?
|
|
607
|
+
fail ArgumentError, 'url_issuer cannot be nil'
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
@url_issuer = url_issuer
|
|
611
|
+
end
|
|
612
|
+
|
|
578
613
|
# Checks equality by comparing each attribute.
|
|
579
614
|
# @param [Object] Object to be compared
|
|
580
615
|
def ==(o)
|
|
@@ -601,6 +636,7 @@ module Authentik::Api
|
|
|
601
636
|
session_valid_not_on_or_after == o.session_valid_not_on_or_after &&
|
|
602
637
|
name_id_mapping == o.name_id_mapping &&
|
|
603
638
|
authn_context_class_ref_mapping == o.authn_context_class_ref_mapping &&
|
|
639
|
+
saml_version == o.saml_version &&
|
|
604
640
|
digest_algorithm == o.digest_algorithm &&
|
|
605
641
|
signature_algorithm == o.signature_algorithm &&
|
|
606
642
|
signing_kp == o.signing_kp &&
|
|
@@ -609,7 +645,8 @@ module Authentik::Api
|
|
|
609
645
|
sign_logout_request == o.sign_logout_request &&
|
|
610
646
|
default_name_id_policy == o.default_name_id_policy &&
|
|
611
647
|
url_download_metadata == o.url_download_metadata &&
|
|
612
|
-
url_wsfed == o.url_wsfed
|
|
648
|
+
url_wsfed == o.url_wsfed &&
|
|
649
|
+
url_issuer == o.url_issuer
|
|
613
650
|
end
|
|
614
651
|
|
|
615
652
|
# @see the `==` method
|
|
@@ -621,7 +658,7 @@ module Authentik::Api
|
|
|
621
658
|
# Calculates hash code according to all attributes.
|
|
622
659
|
# @return [Integer] Hash code
|
|
623
660
|
def hash
|
|
624
|
-
[pk, name, authentication_flow, authorization_flow, invalidation_flow, property_mappings, component, assigned_application_slug, assigned_application_name, assigned_backchannel_application_slug, assigned_backchannel_application_name, verbose_name, verbose_name_plural, meta_model_name, 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, url_download_metadata, url_wsfed].hash
|
|
661
|
+
[pk, name, authentication_flow, authorization_flow, invalidation_flow, property_mappings, component, assigned_application_slug, assigned_application_name, assigned_backchannel_application_slug, assigned_backchannel_application_name, verbose_name, verbose_name_plural, meta_model_name, 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, url_download_metadata, url_wsfed, url_issuer].hash
|
|
625
662
|
end
|
|
626
663
|
|
|
627
664
|
# Builds the object from hash
|
|
@@ -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',
|
|
@@ -227,6 +232,10 @@ module Authentik::Api
|
|
|
227
232
|
self.authn_context_class_ref_mapping = attributes[:'authn_context_class_ref_mapping']
|
|
228
233
|
end
|
|
229
234
|
|
|
235
|
+
if attributes.key?(:'saml_version')
|
|
236
|
+
self.saml_version = attributes[:'saml_version']
|
|
237
|
+
end
|
|
238
|
+
|
|
230
239
|
if attributes.key?(:'digest_algorithm')
|
|
231
240
|
self.digest_algorithm = attributes[:'digest_algorithm']
|
|
232
241
|
end
|
|
@@ -447,6 +456,7 @@ module Authentik::Api
|
|
|
447
456
|
session_valid_not_on_or_after == o.session_valid_not_on_or_after &&
|
|
448
457
|
name_id_mapping == o.name_id_mapping &&
|
|
449
458
|
authn_context_class_ref_mapping == o.authn_context_class_ref_mapping &&
|
|
459
|
+
saml_version == o.saml_version &&
|
|
450
460
|
digest_algorithm == o.digest_algorithm &&
|
|
451
461
|
signature_algorithm == o.signature_algorithm &&
|
|
452
462
|
signing_kp == o.signing_kp &&
|
|
@@ -465,7 +475,7 @@ module Authentik::Api
|
|
|
465
475
|
# Calculates hash code according to all attributes.
|
|
466
476
|
# @return [Integer] Hash code
|
|
467
477
|
def hash
|
|
468
|
-
[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
|
|
478
|
+
[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
|
|
469
479
|
end
|
|
470
480
|
|
|
471
481
|
# Builds the object from hash
|
data/spec/api/admin_api_spec.rb
CHANGED
|
@@ -87,6 +87,7 @@ describe 'AdminApi' do
|
|
|
87
87
|
# unit tests for admin_models_list
|
|
88
88
|
# Read-only view list all installed models
|
|
89
89
|
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @option opts [Boolean] :filter_has_attributes
|
|
90
91
|
# @return [Array<App>]
|
|
91
92
|
describe 'admin_models_list test' do
|
|
92
93
|
it 'should work' do
|