Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/zitadel-client/api/session_service_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,31 @@ def session_service_create_session_with_http_info(session_service_create_session
# Terminate an existing session
# Terminate your own session or if granted any other session.
# @param session_id [String] \"id of the session to terminate\"
# @param session_service_delete_session_body [SessionServiceDeleteSessionBody]
# @param session_service_delete_session_request [SessionServiceDeleteSessionRequest]
# @param [Hash] opts the optional parameters
# @return [SessionServiceDeleteSessionResponse]
def session_service_delete_session(session_id, session_service_delete_session_body, opts = {})
data, _status_code, _headers = session_service_delete_session_with_http_info(session_id, session_service_delete_session_body, opts)
def session_service_delete_session(session_id, session_service_delete_session_request, opts = {})
data, _status_code, _headers = session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts)
data
end

# Terminate an existing session
# Terminate your own session or if granted any other session.
# @param session_id [String] \"id of the session to terminate\"
# @param session_service_delete_session_body [SessionServiceDeleteSessionBody]
# @param session_service_delete_session_request [SessionServiceDeleteSessionRequest]
# @param [Hash] opts the optional parameters
# @return [Array<(SessionServiceDeleteSessionResponse, Integer, Hash)>] SessionServiceDeleteSessionResponse data, response status code and response headers
def session_service_delete_session_with_http_info(session_id, session_service_delete_session_body, opts = {})
def session_service_delete_session_with_http_info(session_id, session_service_delete_session_request, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SessionServiceApi.session_service_delete_session ...'
end
# verify the required parameter 'session_id' is set
if @api_client.config.client_side_validation && session_id.nil?
fail ArgumentError, "Missing the required parameter 'session_id' when calling SessionServiceApi.session_service_delete_session"
end
# verify the required parameter 'session_service_delete_session_body' is set
if @api_client.config.client_side_validation && session_service_delete_session_body.nil?
fail ArgumentError, "Missing the required parameter 'session_service_delete_session_body' when calling SessionServiceApi.session_service_delete_session"
# verify the required parameter 'session_service_delete_session_request' is set
if @api_client.config.client_side_validation && session_service_delete_session_request.nil?
fail ArgumentError, "Missing the required parameter 'session_service_delete_session_request' when calling SessionServiceApi.session_service_delete_session"
end
# resource path
local_var_path = '/v2/sessions/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
Expand All @@ -136,7 +136,7 @@ def session_service_delete_session_with_http_info(session_id, session_service_de
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_delete_session_body)
post_body = opts[:debug_body] || @api_client.object_to_http_body(session_service_delete_session_request)

# return_type
return_type = opts[:debug_return_type] || 'SessionServiceDeleteSessionResponse'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,6 @@ class IdentityProviderServiceAzureADTenant

attr_accessor :tenant_id

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module ZitadelClient
class SessionServiceDeleteSessionBody
class SessionServiceDeleteSessionRequest
# \"The current token of the session, previously returned on the create / update request. The token is required unless the authenticated user terminates the own session or is granted the `session.delete` permission.\"
attr_accessor :session_token

Expand Down Expand Up @@ -52,14 +52,14 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceDeleteSessionBody` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceDeleteSessionRequest` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceDeleteSessionBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceDeleteSessionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module ZitadelClient
class SessionServiceRequestChallengesOTPEmailSendCode
class SessionServiceOTPEmailSendCode
# Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: Code, UserID, LoginName, DisplayName, PreferredLanguage, SessionID
attr_accessor :url_template

Expand Down Expand Up @@ -52,14 +52,14 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceRequestChallengesOTPEmailSendCode` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `ZitadelClient::SessionServiceOTPEmailSendCode` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceRequestChallengesOTPEmailSendCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `ZitadelClient::SessionServiceOTPEmailSendCode`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'send_code' => :'SessionServiceRequestChallengesOTPEmailSendCode',
:'send_code' => :'SessionServiceOTPEmailSendCode',
:'return_code' => :'Object'
}
end
Expand Down
22 changes: 0 additions & 22 deletions lib/zitadel-client/models/user_service_auth_factor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,6 @@ class UserServiceAuthFactor

attr_accessor :otp_email

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
Expand Down
22 changes: 0 additions & 22 deletions lib/zitadel-client/models/user_service_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,6 @@ class UserServiceUser

attr_accessor :machine

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
Expand Down
2 changes: 1 addition & 1 deletion spec/check_session_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
end

after do
delete_req = ZitadelClient::SessionServiceDeleteSessionBody.new
delete_req = ZitadelClient::SessionServiceDeleteSessionRequest.new
begin
client.sessions.session_service_delete_session(@session_id, delete_req)
rescue StandardError
Expand Down
Loading