Class: ClerkHttpClient::SessionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/clerk-http-client/api/sessions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SessionsApi

Returns a new instance of SessionsApi.



19
20
21
# File 'lib/clerk-http-client/api/sessions_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/clerk-http-client/api/sessions_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_session(opts = {}) ⇒ Session

Create a new active session Create a new active session for the provided user ID. This operation is only available for Clerk Development instances.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



28
29
30
31
# File 'lib/clerk-http-client/api/sessions_api.rb', line 28

def create_session(opts = {})
  data, _status_code, _headers = create_session_with_http_info(opts)
  data
end

#create_session_token(session_id, opts = {}) ⇒ CreateSessionToken200Response

Create a session token Creates a session JSON Web Token (JWT) based on a session.

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



95
96
97
98
# File 'lib/clerk-http-client/api/sessions_api.rb', line 95

def create_session_token(session_id, opts = {})
  data, _status_code, _headers = create_session_token_with_http_info(session_id, opts)
  data
end

#create_session_token_from_template(session_id, template_name, opts = {}) ⇒ CreateSessionToken200Response

Create a session token from a jwt template Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance

Parameters:

  • session_id (String)

    The ID of the session

  • template_name (String)

    The name of the JWT Template defined in your instance (e.g. `custom_hasura`).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



168
169
170
171
# File 'lib/clerk-http-client/api/sessions_api.rb', line 168

def create_session_token_from_template(session_id, template_name, opts = {})
  data, _status_code, _headers = create_session_token_from_template_with_http_info(session_id, template_name, opts)
  data
end

#create_session_token_from_template_with_http_info(session_id, template_name, opts = {}) ⇒ Array<(CreateSessionToken200Response, Integer, Hash)>

Create a session token from a jwt template Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance POST

Parameters:

  • session_id (String)

    The ID of the session

  • template_name (String)

    The name of the JWT Template defined in your instance (e.g. &#x60;custom_hasura&#x60;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/clerk-http-client/api/sessions_api.rb', line 181

def create_session_token_from_template_with_http_info(session_id, template_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.create_session_token_from_template ...'
  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 SessionsApi.create_session_token_from_template"
  end
  # verify the required parameter 'template_name' is set
  if @api_client.config.client_side_validation && template_name.nil?
    fail ArgumentError, "Missing the required parameter 'template_name' when calling SessionsApi.create_session_token_from_template"
  end
  # resource path
  local_var_path = '/sessions/{session_id}/tokens/{template_name}'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s)).sub('{' + 'template_name' + '}', CGI.escape(template_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

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

  # return_type
  return_type = opts[:debug_return_type] || 'CreateSessionToken200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.create_session_token_from_template",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#create_session_token_from_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_session_token_with_http_info(session_id, opts = {}) ⇒ Array<(CreateSessionToken200Response, Integer, Hash)>

Create a session token Creates a session JSON Web Token (JWT) based on a session. POST

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/clerk-http-client/api/sessions_api.rb', line 107

def create_session_token_with_http_info(session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.create_session_token ...'
  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 SessionsApi.create_session_token"
  end
  # resource path
  local_var_path = '/sessions/{session_id}/tokens'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

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

  # return_type
  return_type = opts[:debug_return_type] || 'CreateSessionToken200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.create_session_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#create_session_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_session_with_http_info(opts = {}) ⇒ Array<(Session, Integer, Hash)>

Create a new active session Create a new active session for the provided user ID. This operation is only available for Clerk Development instances. POST

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Session, Integer, Hash)>)

    Session data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/clerk-http-client/api/sessions_api.rb', line 39

def create_session_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.create_session ...'
  end
  # resource path
  local_var_path = '/sessions'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

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

  # return_type
  return_type = opts[:debug_return_type] || 'Session'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.create_session",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_session(session_id, opts = {}) ⇒ Session

Retrieve a session Retrieve the details of a session

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



244
245
246
247
# File 'lib/clerk-http-client/api/sessions_api.rb', line 244

def get_session(session_id, opts = {})
  data, _status_code, _headers = get_session_with_http_info(session_id, opts)
  data
end

#get_session_list(opts = {}) ⇒ Array<Session>

List all sessions Returns a list of all sessions. The sessions are returned sorted by creation date, with the newest sessions appearing first. **Deprecation Notice (2024-01-01):** All parameters were initially considered optional, however moving forward at least one of ‘client_id` or `user_id` parameters should be provided.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_id (String)

    List sessions for the given client

  • :user_id (String)

    List sessions for the given user

  • :status (String)

    Filter sessions by the provided status

  • :limit (Float)

    Applies a limit to the number of results returned. Can be used for paginating the results together with &#x60;offset&#x60;. (default to 10)

  • :offset (Float)

    Skip the first &#x60;offset&#x60; results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with &#x60;limit&#x60;. (default to 0)

Returns:



313
314
315
316
# File 'lib/clerk-http-client/api/sessions_api.rb', line 313

def get_session_list(opts = {})
  data, _status_code, _headers = get_session_list_with_http_info(opts)
  data
end

#get_session_list_with_http_info(opts = {}) ⇒ Array<(Array<Session>, Integer, Hash)>

List all sessions Returns a list of all sessions. The sessions are returned sorted by creation date, with the newest sessions appearing first. **Deprecation Notice (2024-01-01):** All parameters were initially considered optional, however moving forward at least one of &#x60;client_id&#x60; or &#x60;user_id&#x60; parameters should be provided. GET array

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_id (String)

    List sessions for the given client

  • :user_id (String)

    List sessions for the given user

  • :status (String)

    Filter sessions by the provided status

  • :limit (Float)

    Applies a limit to the number of results returned. Can be used for paginating the results together with &#x60;offset&#x60;. (default to 10)

  • :offset (Float)

    Skip the first &#x60;offset&#x60; results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with &#x60;limit&#x60;. (default to 0)

Returns:

  • (Array<(Array<Session>, Integer, Hash)>)

    Array<Session> data, response status code and response headers



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/clerk-http-client/api/sessions_api.rb', line 328

def get_session_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.get_session_list ...'
  end
  allowable_values = ["abandoned", "active", "ended", "expired", "removed", "replaced", "revoked"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SessionsApi.get_session_list, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SessionsApi.get_session_list, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling SessionsApi.get_session_list, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/sessions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Session>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.get_session_list",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#get_session_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_session_with_http_info(session_id, opts = {}) ⇒ Array<(Session, Integer, Hash)>

Retrieve a session Retrieve the details of a session GET

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Session, Integer, Hash)>)

    Session data, response status code and response headers



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/clerk-http-client/api/sessions_api.rb', line 255

def get_session_with_http_info(session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.get_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 SessionsApi.get_session"
  end
  # resource path
  local_var_path = '/sessions/{session_id}'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Session'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.get_session",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_session(session_id, opts = {}) ⇒ Session

Revoke a session Sets the status of a session as "revoked", which is an unauthenticated state. In multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again.

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



399
400
401
402
# File 'lib/clerk-http-client/api/sessions_api.rb', line 399

def revoke_session(session_id, opts = {})
  data, _status_code, _headers = revoke_session_with_http_info(session_id, opts)
  data
end

#revoke_session_with_http_info(session_id, opts = {}) ⇒ Array<(Session, Integer, Hash)>

Revoke a session Sets the status of a session as &quot;revoked&quot;, which is an unauthenticated state. In multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again. POST

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Session, Integer, Hash)>)

    Session data, response status code and response headers



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/clerk-http-client/api/sessions_api.rb', line 410

def revoke_session_with_http_info(session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.revoke_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 SessionsApi.revoke_session"
  end
  # resource path
  local_var_path = '/sessions/{session_id}/revoke'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Session'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.revoke_session",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#revoke_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verify_session(session_id, opts = {}) ⇒ Session

Verify a session Returns the session if it is authenticated, otherwise returns an error. WARNING: This endpoint is deprecated and will be removed in future versions. We strongly recommend switching to networkless verification using short-lived session tokens, which is implemented transparently in all recent SDK versions (e.g. [NodeJS SDK](clerk.com/docs/backend-requests/handling/nodejs#clerk-express-require-auth)). For more details on how networkless verification works, refer to our [Session Tokens documentation](clerk.com/docs/backend-requests/resources/session-tokens).

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



465
466
467
468
# File 'lib/clerk-http-client/api/sessions_api.rb', line 465

def verify_session(session_id, opts = {})
  data, _status_code, _headers = verify_session_with_http_info(session_id, opts)
  data
end

#verify_session_with_http_info(session_id, opts = {}) ⇒ Array<(Session, Integer, Hash)>

Verify a session Returns the session if it is authenticated, otherwise returns an error. WARNING: This endpoint is deprecated and will be removed in future versions. We strongly recommend switching to networkless verification using short-lived session tokens, which is implemented transparently in all recent SDK versions (e.g. [NodeJS SDK](clerk.com/docs/backend-requests/handling/nodejs#clerk-express-require-auth)). For more details on how networkless verification works, refer to our [Session Tokens documentation](clerk.com/docs/backend-requests/resources/session-tokens). POST

Parameters:

  • session_id (String)

    The ID of the session

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Session, Integer, Hash)>)

    Session data, response status code and response headers



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
# File 'lib/clerk-http-client/api/sessions_api.rb', line 477

def verify_session_with_http_info(session_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SessionsApi.verify_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 SessionsApi.verify_session"
  end
  # resource path
  local_var_path = '/sessions/{session_id}/verify'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

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

  # return_type
  return_type = opts[:debug_return_type] || 'Session'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"SessionsApi.verify_session",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SessionsApi#verify_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end