Class: OryClient::V0alpha2Api

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-client/api/v0alpha2_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ V0alpha2Api

Returns a new instance of V0alpha2Api.



19
20
21
# File 'lib/ory-client/api/v0alpha2_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/ory-client/api/v0alpha2_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

Accept an OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



28
29
30
31
# File 'lib/ory-client/api/v0alpha2_api.rb', line 28

def admin_accept_o_auth2_consent_request(consent_challenge, opts = {})
  data, _status_code, _headers = admin_accept_o_auth2_consent_request_with_http_info(consent_challenge, opts)
  data
end

Accept an OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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
87
88
89
90
91
# File 'lib/ory-client/api/v0alpha2_api.rb', line 39

def admin_accept_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_accept_o_auth2_consent_request ...'
  end
  # verify the required parameter 'consent_challenge' is set
  if @api_client.config.client_side_validation && consent_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling V0alpha2Api.admin_accept_o_auth2_consent_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/consent/accept'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # 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[:'accept_o_auth2_consent_request'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_accept_o_auth2_consent_request",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_accept_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_accept_o_auth2_login_request(login_challenge, opts = {}) ⇒ SuccessfulOAuth2RequestResponse

Accept an OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell Ory Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



99
100
101
102
# File 'lib/ory-client/api/v0alpha2_api.rb', line 99

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

#admin_accept_o_auth2_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>

Accept an OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory Hydra asks the login provider (sometimes called &quot;identity provider&quot;) to authenticate the subject and then tell Ory Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (&quot;show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is &quot;resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject&#39;s ID and if ORY Hydra should remember the subject&#39;s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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
159
160
161
162
# File 'lib/ory-client/api/v0alpha2_api.rb', line 110

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_accept_o_auth2_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling V0alpha2Api.admin_accept_o_auth2_login_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/login/accept'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # 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[:'accept_o_auth2_login_request'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_accept_o_auth2_login_request",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_accept_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_accept_o_auth2_logout_request(logout_challenge, opts = {}) ⇒ SuccessfulOAuth2RequestResponse

Accept an OAuth 2.0 Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Returns:



169
170
171
172
# File 'lib/ory-client/api/v0alpha2_api.rb', line 169

def admin_accept_o_auth2_logout_request(logout_challenge, opts = {})
  data, _status_code, _headers = admin_accept_o_auth2_logout_request_with_http_info(logout_challenge, opts)
  data
end

#admin_accept_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>

Accept an OAuth 2.0 Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Returns:



179
180
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
# File 'lib/ory-client/api/v0alpha2_api.rb', line 179

def admin_accept_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_accept_o_auth2_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling V0alpha2Api.admin_accept_o_auth2_logout_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/logout/accept'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_accept_o_auth2_logout_request",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_accept_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_create_identity(opts = {}) ⇒ Identity

Create an Identity This endpoint creates an identity. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



233
234
235
236
# File 'lib/ory-client/api/v0alpha2_api.rb', line 233

def admin_create_identity(opts = {})
  data, _status_code, _headers = admin_create_identity_with_http_info(opts)
  data
end

#admin_create_identity_with_http_info(opts = {}) ⇒ Array<(Identity, Integer, Hash)>

Create an Identity This endpoint creates an identity. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Identity data, response status code and response headers



243
244
245
246
247
248
249
250
251
252
253
254
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
# File 'lib/ory-client/api/v0alpha2_api.rb', line 243

def admin_create_identity_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_identity ...'
  end
  # resource path
  local_var_path = '/admin/identities'

  # 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'])
  # 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[:'admin_create_identity_body'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_create_identity",
    :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: V0alpha2Api#admin_create_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_create_json_web_key_set(set, admin_create_json_web_key_set_body, opts = {}) ⇒ JsonWebKeySet

Generate a New JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Returns:



298
299
300
301
# File 'lib/ory-client/api/v0alpha2_api.rb', line 298

def admin_create_json_web_key_set(set, admin_create_json_web_key_set_body, opts = {})
  data, _status_code, _headers = admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body, opts)
  data
end

#admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body, opts = {}) ⇒ Array<(JsonWebKeySet, Integer, Hash)>

Generate a New JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
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
# File 'lib/ory-client/api/v0alpha2_api.rb', line 309

def admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_create_json_web_key_set"
  end
  # verify the required parameter 'admin_create_json_web_key_set_body' is set
  if @api_client.config.client_side_validation && admin_create_json_web_key_set_body.nil?
    fail ArgumentError, "Missing the required parameter 'admin_create_json_web_key_set_body' when calling V0alpha2Api.admin_create_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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'])
  # 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(admin_create_json_web_key_set_body)

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_create_json_web_key_set",
    :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: V0alpha2Api#admin_create_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_create_o_auth2_client(o_auth2_client, opts = {}) ⇒ OAuth2Client

Create an OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

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

    the optional parameters

Returns:



371
372
373
374
# File 'lib/ory-client/api/v0alpha2_api.rb', line 371

def admin_create_o_auth2_client(o_auth2_client, opts = {})
  data, _status_code, _headers = admin_create_o_auth2_client_with_http_info(o_auth2_client, opts)
  data
end

#admin_create_o_auth2_client_with_http_info(o_auth2_client, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Create an OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/ory-client/api/v0alpha2_api.rb', line 381

def admin_create_o_auth2_client_with_http_info(o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_o_auth2_client ...'
  end
  # verify the required parameter 'o_auth2_client' is set
  if @api_client.config.client_side_validation && o_auth2_client.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.admin_create_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients'

  # 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'])
  # 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(o_auth2_client)

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_create_o_auth2_client",
    :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: V0alpha2Api#admin_create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_create_self_service_recovery_code(opts = {}) ⇒ SelfServiceRecoveryCode

Create a Recovery Link This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



439
440
441
442
# File 'lib/ory-client/api/v0alpha2_api.rb', line 439

def admin_create_self_service_recovery_code(opts = {})
  data, _status_code, _headers = admin_create_self_service_recovery_code_with_http_info(opts)
  data
end

#admin_create_self_service_recovery_code_with_http_info(opts = {}) ⇒ Array<(SelfServiceRecoveryCode, Integer, Hash)>

Create a Recovery Link This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SelfServiceRecoveryCode data, response status code and response headers



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/ory-client/api/v0alpha2_api.rb', line 449

def admin_create_self_service_recovery_code_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_self_service_recovery_code ...'
  end
  # resource path
  local_var_path = '/admin/recovery/code'

  # 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'])
  # 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[:'admin_create_self_service_recovery_code_body'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_create_self_service_recovery_code",
    :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: V0alpha2Api#admin_create_self_service_recovery_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Create a Recovery Link This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



503
504
505
506
# File 'lib/ory-client/api/v0alpha2_api.rb', line 503

def admin_create_self_service_recovery_link(opts = {})
  data, _status_code, _headers = admin_create_self_service_recovery_link_with_http_info(opts)
  data
end

Create a Recovery Link This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SelfServiceRecoveryLink data, response status code and response headers



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/ory-client/api/v0alpha2_api.rb', line 513

def admin_create_self_service_recovery_link_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_self_service_recovery_link ...'
  end
  # resource path
  local_var_path = '/admin/recovery/link'

  # 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'])
  # 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[:'admin_create_self_service_recovery_link_body'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_create_self_service_recovery_link",
    :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: V0alpha2Api#admin_create_self_service_recovery_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_identity(id, opts = {}) ⇒ nil

Delete an Identity Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID is the identity&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


567
568
569
570
# File 'lib/ory-client/api/v0alpha2_api.rb', line 567

def admin_delete_identity(id, opts = {})
  admin_delete_identity_with_http_info(id, opts)
  nil
end

#admin_delete_identity_sessions(id, opts = {}) ⇒ nil

Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. This endpoint is useful for: To forcefully logout Identity from all devices and sessions

Parameters:

  • id (String)

    ID is the identity&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


630
631
632
633
# File 'lib/ory-client/api/v0alpha2_api.rb', line 630

def admin_delete_identity_sessions(id, opts = {})
  admin_delete_identity_sessions_with_http_info(id, opts)
  nil
end

#admin_delete_identity_sessions_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity. This endpoint is useful for: To forcefully logout Identity from all devices and sessions

Parameters:

  • id (String)

    ID is the identity&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/ory-client/api/v0alpha2_api.rb', line 640

def admin_delete_identity_sessions_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity_sessions ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity_sessions"
  end
  # resource path
  local_var_path = '/admin/identities/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_identity_sessions",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_identity_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an Identity Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID is the identity&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# File 'lib/ory-client/api/v0alpha2_api.rb', line 577

def admin_delete_identity_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity"
  end
  # resource path
  local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_identity",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_json_web_key(set, kid, opts = {}) ⇒ nil

Delete a JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Returns:

  • (nil)


694
695
696
697
# File 'lib/ory-client/api/v0alpha2_api.rb', line 694

def admin_delete_json_web_key(set, kid, opts = {})
  admin_delete_json_web_key_with_http_info(set, kid, opts)
  nil
end

#admin_delete_json_web_key_set(set, opts = {}) ⇒ nil

Delete a JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Returns:

  • (nil)


762
763
764
765
# File 'lib/ory-client/api/v0alpha2_api.rb', line 762

def admin_delete_json_web_key_set(set, opts = {})
  admin_delete_json_web_key_set_with_http_info(set, opts)
  nil
end

#admin_delete_json_web_key_set_with_http_info(set, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/ory-client/api/v0alpha2_api.rb', line 772

def admin_delete_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_delete_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_json_web_key_set",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_json_web_key_with_http_info(set, kid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/ory-client/api/v0alpha2_api.rb', line 705

def admin_delete_json_web_key_with_http_info(set, kid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_json_web_key ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_delete_json_web_key"
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling V0alpha2Api.admin_delete_json_web_key"
  end
  # resource path
  local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_json_web_key",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_o_auth2_client(id, opts = {}) ⇒ nil

Deletes an OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

  • (nil)


825
826
827
828
# File 'lib/ory-client/api/v0alpha2_api.rb', line 825

def admin_delete_o_auth2_client(id, opts = {})
  admin_delete_o_auth2_client_with_http_info(id, opts)
  nil
end

#admin_delete_o_auth2_client_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deletes an OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
# File 'lib/ory-client/api/v0alpha2_api.rb', line 835

def admin_delete_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_o_auth2_client",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_o_auth2_token(client_id, opts = {}) ⇒ nil

Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database

Parameters:

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

    the optional parameters

Returns:

  • (nil)


888
889
890
891
# File 'lib/ory-client/api/v0alpha2_api.rb', line 888

def admin_delete_o_auth2_token(client_id, opts = {})
  admin_delete_o_auth2_token_with_http_info(client_id, opts)
  nil
end

#admin_delete_o_auth2_token_with_http_info(client_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
# File 'lib/ory-client/api/v0alpha2_api.rb', line 898

def admin_delete_o_auth2_token_with_http_info(client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_o_auth2_token ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling V0alpha2Api.admin_delete_o_auth2_token"
  end
  # resource path
  local_var_path = '/admin/oauth2/tokens'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_o_auth2_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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_delete_trusted_o_auth2_jwt_grant_issuer(id, opts = {}) ⇒ nil

Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:

  • (nil)


952
953
954
955
# File 'lib/ory-client/api/v0alpha2_api.rb', line 952

def admin_delete_trusted_o_auth2_jwt_grant_issuer(id, opts = {})
  admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts)
  nil
end

#admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
# File 'lib/ory-client/api/v0alpha2_api.rb', line 962

def admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_trusted_o_auth2_jwt_grant_issuer ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_trusted_o_auth2_jwt_grant_issuer"
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_delete_trusted_o_auth2_jwt_grant_issuer",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_extend_session(id, opts = {}) ⇒ Session

Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.

Parameters:

  • id (String)

    ID is the session&#39;s ID.

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

    the optional parameters

Returns:



1015
1016
1017
1018
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1015

def admin_extend_session(id, opts = {})
  data, _status_code, _headers = admin_extend_session_with_http_info(id, opts)
  data
end

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

Calling this endpoint extends the given session ID. If &#x60;session.earliest_possible_extend&#x60; is set it will only extend the session after the specified time has passed. Retrieve the session ID from the &#x60;/sessions/whoami&#x60; endpoint / &#x60;toSession&#x60; SDK method.

Parameters:

  • id (String)

    ID is the session&#39;s ID.

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

    the optional parameters

Returns:

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

    Session data, response status code and response headers



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1025

def admin_extend_session_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_extend_session ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_extend_session"
  end
  # resource path
  local_var_path = '/admin/sessions/{id}/extend'.sub('{' + 'id' + '}', CGI.escape(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'])

  # 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] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_extend_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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_extend_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_identity(id, opts = {}) ⇒ Identity

Get an Identity Learn how identities work in [Ory Kratos' User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID must be set to the ID of identity you want to get

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

    the optional parameters

Options Hash (opts):

  • :include_credential (Array<String>)

    DeclassifyCredentials will declassify one or more identity&#39;s credentials Currently, only &#x60;oidc&#x60; is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token.

Returns:



1079
1080
1081
1082
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1079

def admin_get_identity(id, opts = {})
  data, _status_code, _headers = admin_get_identity_with_http_info(id, opts)
  data
end

#admin_get_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>

Get an Identity Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID must be set to the ID of identity you want to get

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

    the optional parameters

Options Hash (opts):

  • :include_credential (Array<String>)

    DeclassifyCredentials will declassify one or more identity&#39;s credentials Currently, only &#x60;oidc&#x60; is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token.

Returns:

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

    Identity data, response status code and response headers



1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1090

def admin_get_identity_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_identity ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_identity"
  end
  # resource path
  local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include_credential'] = @api_client.build_collection_param(opts[:'include_credential'], :multi) if !opts[:'include_credential'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_identity",
    :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: V0alpha2Api#admin_get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_json_web_key(set, kid, opts = {}) ⇒ JsonWebKeySet

Fetch a JSON Web Key This endpoint returns a singular JSON Web Key. It is identified by the set and the specific key ID (kid).

Parameters:

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Returns:



1145
1146
1147
1148
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1145

def admin_get_json_web_key(set, kid, opts = {})
  data, _status_code, _headers = admin_get_json_web_key_with_http_info(set, kid, opts)
  data
end

#admin_get_json_web_key_set(set, opts = {}) ⇒ JsonWebKeySet

Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Returns:



1213
1214
1215
1216
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1213

def admin_get_json_web_key_set(set, opts = {})
  data, _status_code, _headers = admin_get_json_web_key_set_with_http_info(set, opts)
  data
end

#admin_get_json_web_key_set_with_http_info(set, opts = {}) ⇒ Array<(JsonWebKeySet, Integer, Hash)>

Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1223

def admin_get_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_get_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_json_web_key_set",
    :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: V0alpha2Api#admin_get_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_json_web_key_with_http_info(set, kid, opts = {}) ⇒ Array<(JsonWebKeySet, Integer, Hash)>

Fetch a JSON Web Key This endpoint returns a singular JSON Web Key. It is identified by the set and the specific key ID (kid).

Parameters:

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1156

def admin_get_json_web_key_with_http_info(set, kid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_json_web_key ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_get_json_web_key"
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling V0alpha2Api.admin_get_json_web_key"
  end
  # resource path
  local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_json_web_key",
    :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: V0alpha2Api#admin_get_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_o_auth2_client(id, opts = {}) ⇒ OAuth2Client

Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:



1276
1277
1278
1279
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1276

def admin_get_o_auth2_client(id, opts = {})
  data, _status_code, _headers = admin_get_o_auth2_client_with_http_info(id, opts)
  data
end

#admin_get_o_auth2_client_with_http_info(id, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1286

def admin_get_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_o_auth2_client",
    :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: V0alpha2Api#admin_get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get OAuth 2.0 Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.

Parameters:

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

    the optional parameters

Returns:



1339
1340
1341
1342
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1339

def admin_get_o_auth2_consent_request(consent_challenge, opts = {})
  data, _status_code, _headers = admin_get_o_auth2_consent_request_with_http_info(consent_challenge, opts)
  data
end

Get OAuth 2.0 Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (&quot;Application my-dropbox-app wants write access to all your private files&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2ConsentRequest data, response status code and response headers



1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1349

def admin_get_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_consent_request ...'
  end
  # verify the required parameter 'consent_challenge' is set
  if @api_client.config.client_side_validation && consent_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling V0alpha2Api.admin_get_o_auth2_consent_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/consent'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_o_auth2_consent_request",
    :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: V0alpha2Api#admin_get_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_o_auth2_login_request(login_challenge, opts = {}) ⇒ OAuth2LoginRequest

Get an OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.

Parameters:

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

    the optional parameters

Returns:



1403
1404
1405
1406
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1403

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

#admin_get_o_auth2_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(OAuth2LoginRequest, Integer, Hash)>

Get an OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called &quot;identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (&quot;show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is &quot;resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2LoginRequest data, response status code and response headers



1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1413

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling V0alpha2Api.admin_get_o_auth2_login_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/login'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_o_auth2_login_request",
    :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: V0alpha2Api#admin_get_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_o_auth2_logout_request(logout_challenge, opts = {}) ⇒ OAuth2LogoutRequest

Get an OAuth 2.0 Logout Request Use this endpoint to fetch a logout request.

Parameters:

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

    the optional parameters

Returns:



1467
1468
1469
1470
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1467

def admin_get_o_auth2_logout_request(logout_challenge, opts = {})
  data, _status_code, _headers = admin_get_o_auth2_logout_request_with_http_info(logout_challenge, opts)
  data
end

#admin_get_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(OAuth2LogoutRequest, Integer, Hash)>

Get an OAuth 2.0 Logout Request Use this endpoint to fetch a logout request.

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2LogoutRequest data, response status code and response headers



1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1477

def admin_get_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling V0alpha2Api.admin_get_o_auth2_logout_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/logout'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_o_auth2_logout_request",
    :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: V0alpha2Api#admin_get_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_get_trusted_o_auth2_jwt_grant_issuer(id, opts = {}) ⇒ TrustedOAuth2JwtGrantIssuer

Get a Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:



1531
1532
1533
1534
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1531

def admin_get_trusted_o_auth2_jwt_grant_issuer(id, opts = {})
  data, _status_code, _headers = admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts)
  data
end

#admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {}) ⇒ Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>

Get a Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:

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

    TrustedOAuth2JwtGrantIssuer data, response status code and response headers



1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1541

def admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_trusted_o_auth2_jwt_grant_issuer ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_trusted_o_auth2_jwt_grant_issuer"
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_get_trusted_o_auth2_jwt_grant_issuer",
    :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: V0alpha2Api#admin_get_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_introspect_o_auth2_token(token, opts = {}) ⇒ IntrospectedOAuth2Token

Introspect OAuth2 Access or Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow. For more information [read this blog post](www.oauth.com/oauth2-servers/token-introspection-endpoint/).

Parameters:

  • token (String)

    The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned.

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.

Returns:



1595
1596
1597
1598
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1595

def admin_introspect_o_auth2_token(token, opts = {})
  data, _status_code, _headers = admin_introspect_o_auth2_token_with_http_info(token, opts)
  data
end

#admin_introspect_o_auth2_token_with_http_info(token, opts = {}) ⇒ Array<(IntrospectedOAuth2Token, Integer, Hash)>

Introspect OAuth2 Access or Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow. For more information [read this blog post](www.oauth.com/oauth2-servers/token-introspection-endpoint/).

Parameters:

  • token (String)

    The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned.

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.

Returns:

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

    IntrospectedOAuth2Token data, response status code and response headers



1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1606

def admin_introspect_o_auth2_token_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_introspect_o_auth2_token ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling V0alpha2Api.admin_introspect_o_auth2_token"
  end
  # resource path
  local_var_path = '/admin/oauth2/introspect'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['token'] = token
  form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_introspect_o_auth2_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: V0alpha2Api#admin_introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_list_courier_messages(opts = {}) ⇒ Array<Message>

List Messages Lists all messages by given status and recipient.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

  • :status (CourierMessageStatus)

    Status filters out messages based on status. If no value is provided, it doesn&#39;t take effect on filter.

  • :recipient (String)

    Recipient filters out messages based on recipient. If no value is provided, it doesn&#39;t take effect on filter.

Returns:



1669
1670
1671
1672
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1669

def admin_list_courier_messages(opts = {})
  data, _status_code, _headers = admin_list_courier_messages_with_http_info(opts)
  data
end

#admin_list_courier_messages_with_http_info(opts = {}) ⇒ Array<(Array<Message>, Integer, Hash)>

List Messages Lists all messages by given status and recipient.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

  • :status (CourierMessageStatus)

    Status filters out messages based on status. If no value is provided, it doesn&#39;t take effect on filter.

  • :recipient (String)

    Recipient filters out messages based on recipient. If no value is provided, it doesn&#39;t take effect on filter.

Returns:

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

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



1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1682

def admin_list_courier_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_courier_messages ...'
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_courier_messages, must be smaller than or equal to 1000.'
  end

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

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

  # resource path
  local_var_path = '/admin/courier/messages'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'recipient'] = opts[:'recipient'] if !opts[:'recipient'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_list_courier_messages",
    :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: V0alpha2Api#admin_list_courier_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_list_identities(opts = {}) ⇒ Array<Identity>

List Identities Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

Returns:



1748
1749
1750
1751
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1748

def admin_list_identities(opts = {})
  data, _status_code, _headers = admin_list_identities_with_http_info(opts)
  data
end

#admin_list_identities_with_http_info(opts = {}) ⇒ Array<(Array<Identity>, Integer, Hash)>

List Identities Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

Returns:

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

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



1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1759

def admin_list_identities_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identities ...'
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be smaller than or equal to 1000.'
  end

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

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

  # resource path
  local_var_path = '/admin/identities'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_list_identities",
    :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: V0alpha2Api#admin_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_list_identity_sessions(id, opts = {}) ⇒ Array<Session>

This endpoint returns all sessions that belong to the given Identity. This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context.

Parameters:

  • id (String)

    ID is the identity&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

  • :active (Boolean)

    Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.

Returns:



1825
1826
1827
1828
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1825

def admin_list_identity_sessions(id, opts = {})
  data, _status_code, _headers = admin_list_identity_sessions_with_http_info(id, opts)
  data
end

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

This endpoint returns all sessions that belong to the given Identity. This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context.

Parameters:

  • id (String)

    ID is the identity&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

  • :active (Boolean)

    Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.

Returns:

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

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



1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1838

def admin_list_identity_sessions_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identity_sessions ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_list_identity_sessions"
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be smaller than or equal to 1000.'
  end

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

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

  # resource path
  local_var_path = '/admin/identities/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?

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

  # 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] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_list_identity_sessions",
    :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: V0alpha2Api#admin_list_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_list_o_auth2_clients(opts = {}) ⇒ Array<OAuth2Client>

List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1909
1910
1911
1912
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1909

def admin_list_o_auth2_clients(opts = {})
  data, _status_code, _headers = admin_list_o_auth2_clients_with_http_info(opts)
  data
end

#admin_list_o_auth2_clients_with_http_info(opts = {}) ⇒ Array<(Array<OAuth2Client>, Integer, Hash)>

List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The &#x60;limit&#x60; parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. The &quot;Link&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;project-slug.projects.oryapis.com/admin/clients?limit=limit&offset=offset>;; rel&#x3D;&quot;page&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to '1')

  • :client_name (String)

    The name of the clients to filter by.

  • :owner (String)

    The owner of the clients to filter by.

Returns:

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

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



1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1922

def admin_list_o_auth2_clients_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_o_auth2_clients ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling V0alpha2Api.admin_list_o_auth2_clients, must be smaller than or equal to 1000.'
  end

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

  # resource path
  local_var_path = '/admin/clients'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'client_name'] = opts[:'client_name'] if !opts[:'client_name'].nil?
  query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_list_o_auth2_clients",
    :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: V0alpha2Api#admin_list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<

Parameters:

  • subject (String)

    The subject to list the consent sessions for.

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

    the optional parameters

Options Hash (opts):

Returns:



1985
1986
1987
1988
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1985

def admin_list_o_auth2_subject_consent_sessions(subject, opts = {})
  data, _status_code, _headers = admin_list_o_auth2_subject_consent_sessions_with_http_info(subject, opts)
  data
end

List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject&#39;s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The &quot;Link&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;hydra-url/admin/oauth2/auth/sessions/consent?subject=user&limit=limit&offset=offset>;; rel&#x3D;&quot;page&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.

Parameters:

  • subject (String)

    The subject to list the consent sessions for.

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

    the optional parameters

Options Hash (opts):

  • :link (String)

    The link header contains pagination links. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination).

  • :x_total_count (String)

    The total number of clients.

Returns:

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

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



1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
# File 'lib/ory-client/api/v0alpha2_api.rb', line 1997

def admin_list_o_auth2_subject_consent_sessions_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_o_auth2_subject_consent_sessions ...'
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling V0alpha2Api.admin_list_o_auth2_subject_consent_sessions"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/sessions/consent'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'link'] = opts[:'link'] if !opts[:'link'].nil?
  header_params[:'x-total-count'] = opts[:'x_total_count'] if !opts[:'x_total_count'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_list_o_auth2_subject_consent_sessions",
    :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: V0alpha2Api#admin_list_o_auth2_subject_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_list_trusted_o_auth2_jwt_grant_issuers(opts = {}) ⇒ Array<TrustedOAuth2JwtGrantIssuer>

List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :max_items (Integer)
  • :default_items (Integer)
  • :issuer (String)

    If optional &quot;issuer&quot; is supplied, only jwt-bearer grants with this issuer will be returned.

  • :limit (Integer)

    The maximum amount of policies returned, upper bound is 500 policies

  • :offset (Integer)

    The offset from where to start looking.

Returns:



2057
2058
2059
2060
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2057

def admin_list_trusted_o_auth2_jwt_grant_issuers(opts = {})
  data, _status_code, _headers = admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts)
  data
end

#admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts = {}) ⇒ Array<(Array<TrustedOAuth2JwtGrantIssuer>, Integer, Hash)>

List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :max_items (Integer)
  • :default_items (Integer)
  • :issuer (String)

    If optional &quot;issuer&quot; is supplied, only jwt-bearer grants with this issuer will be returned.

  • :limit (Integer)

    The maximum amount of policies returned, upper bound is 500 policies

  • :offset (Integer)

    The offset from where to start looking.

Returns:

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

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



2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2071

def admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_trusted_o_auth2_jwt_grant_issuers ...'
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MaxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
  query_params[:'DefaultItems'] = opts[:'default_items'] if !opts[:'default_items'].nil?
  query_params[:'issuer'] = opts[:'issuer'] if !opts[:'issuer'].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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_list_trusted_o_auth2_jwt_grant_issuers",
    :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: V0alpha2Api#admin_list_trusted_o_auth2_jwt_grant_issuers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_patch_identity(id, opts = {}) ⇒ Identity

Patch an Identity Partially updates an Identity's field using [JSON Patch](jsonpatch.com/) NOTE: The fields `id`, `stateChangedAt` and `credentials` are not updateable. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID must be set to the ID of identity you want to update

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

    the optional parameters

Options Hash (opts):

Returns:



2126
2127
2128
2129
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2126

def admin_patch_identity(id, opts = {})
  data, _status_code, _headers = admin_patch_identity_with_http_info(id, opts)
  data
end

#admin_patch_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>

Patch an Identity Partially updates an Identity&#39;s field using [JSON Patch](jsonpatch.com/) NOTE: The fields &#x60;id&#x60;, &#x60;stateChangedAt&#x60; and &#x60;credentials&#x60; are not updateable. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID must be set to the ID of identity you want to update

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Identity data, response status code and response headers



2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2137

def admin_patch_identity_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_patch_identity ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_patch_identity"
  end
  # resource path
  local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])
  # 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[:'json_patch'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_patch_identity",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_patch_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_patch_o_auth2_client(id, json_patch, opts = {}) ⇒ OAuth2Client

Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

  • json_patch (Array<JsonPatch>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2196
2197
2198
2199
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2196

def admin_patch_o_auth2_client(id, json_patch, opts = {})
  data, _status_code, _headers = admin_patch_o_auth2_client_with_http_info(id, json_patch, opts)
  data
end

#admin_patch_o_auth2_client_with_http_info(id, json_patch, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

  • json_patch (Array<JsonPatch>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2207

def admin_patch_o_auth2_client_with_http_info(id, json_patch, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_patch_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_patch_o_auth2_client"
  end
  # verify the required parameter 'json_patch' is set
  if @api_client.config.client_side_validation && json_patch.nil?
    fail ArgumentError, "Missing the required parameter 'json_patch' when calling V0alpha2Api.admin_patch_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])
  # 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(json_patch)

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_patch_o_auth2_client",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_patch_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Reject an OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



2270
2271
2272
2273
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2270

def admin_reject_o_auth2_consent_request(consent_challenge, opts = {})
  data, _status_code, _headers = admin_reject_o_auth2_consent_request_with_http_info(consent_challenge, opts)
  data
end

Reject an OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (&quot;Application my-dropbox-app wants write access to all your private files&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2281

def admin_reject_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_reject_o_auth2_consent_request ...'
  end
  # verify the required parameter 'consent_challenge' is set
  if @api_client.config.client_side_validation && consent_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling V0alpha2Api.admin_reject_o_auth2_consent_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/consent/reject'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # 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[:'reject_o_auth2_request'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_reject_o_auth2_consent_request",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_reject_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_reject_o_auth2_login_request(login_challenge, opts = {}) ⇒ SuccessfulOAuth2RequestResponse

Reject an OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



2341
2342
2343
2344
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2341

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

#admin_reject_o_auth2_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>

Reject an OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called &quot;identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (&quot;show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is &quot;resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2352

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_reject_o_auth2_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling V0alpha2Api.admin_reject_o_auth2_login_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/login/reject'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # 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[:'reject_o_auth2_request'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_reject_o_auth2_login_request",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_reject_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_reject_o_auth2_logout_request(logout_challenge, opts = {}) ⇒ nil

Reject an OAuth 2.0 Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


2412
2413
2414
2415
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2412

def admin_reject_o_auth2_logout_request(logout_challenge, opts = {})
  admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts)
  nil
end

#admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Reject an OAuth 2.0 Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2423

def admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_reject_o_auth2_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling V0alpha2Api.admin_reject_o_auth2_logout_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/logout/reject'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
  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[:'reject_o_auth2_request'])

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_reject_o_auth2_logout_request",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_reject_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.

Parameters:

  • subject (String)

    The subject (Subject) whose consent sessions should be deleted.

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

    the optional parameters

Options Hash (opts):

  • :client (String)

    If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID

  • :all (Boolean)

    If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.

Returns:

  • (nil)


2484
2485
2486
2487
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2484

def admin_revoke_o_auth2_consent_sessions(subject, opts = {})
  admin_revoke_o_auth2_consent_sessions_with_http_info(subject, opts)
  nil
end

Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject&#39;s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.

Parameters:

  • subject (String)

    The subject (Subject) whose consent sessions should be deleted.

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

    the optional parameters

Options Hash (opts):

  • :client (String)

    If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID

  • :all (Boolean)

    If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.

Returns:

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

    nil, response status code and response headers



2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2496

def admin_revoke_o_auth2_consent_sessions_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_revoke_o_auth2_consent_sessions ...'
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling V0alpha2Api.admin_revoke_o_auth2_consent_sessions"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/sessions/consent'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subject'] = subject
  query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil?
  query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_revoke_o_auth2_consent_sessions",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_revoke_o_auth2_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_revoke_o_auth2_login_sessions(subject, opts = {}) ⇒ nil

Invalidates All OAuth 2.0 Login Sessions of a Certain User This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.

Parameters:

  • subject (String)

    The subject to revoke authentication sessions for.

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

    the optional parameters

Returns:

  • (nil)


2552
2553
2554
2555
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2552

def (subject, opts = {})
  (subject, opts)
  nil
end

#admin_revoke_o_auth2_login_sessions_with_http_info(subject, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Invalidates All OAuth 2.0 Login Sessions of a Certain User This endpoint invalidates a subject&#39;s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.

Parameters:

  • subject (String)

    The subject to revoke authentication sessions for.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2562

def (subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_revoke_o_auth2_login_sessions ...'
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling V0alpha2Api.admin_revoke_o_auth2_login_sessions"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/sessions/login'

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_revoke_o_auth2_login_sessions",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_revoke_o_auth2_login_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_trust_o_auth2_jwt_grant_issuer(opts = {}) ⇒ TrustedOAuth2JwtGrantIssuer

Trust an OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](datatracker.ietf.org/doc/html/rfc7523).

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



2616
2617
2618
2619
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2616

def admin_trust_o_auth2_jwt_grant_issuer(opts = {})
  data, _status_code, _headers = admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts)
  data
end

#admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts = {}) ⇒ Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>

Trust an OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](datatracker.ietf.org/doc/html/rfc7523).

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    TrustedOAuth2JwtGrantIssuer data, response status code and response headers



2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2626

def admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_trust_o_auth2_jwt_grant_issuer ...'
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers'

  # 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'])
  # 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[:'admin_trust_o_auth2_jwt_grant_issuer_body'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_trust_o_auth2_jwt_grant_issuer",
    :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: V0alpha2Api#admin_trust_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_update_identity(id, opts = {}) ⇒ Identity

Update an Identity This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID must be set to the ID of identity you want to update

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

    the optional parameters

Options Hash (opts):

Returns:



2681
2682
2683
2684
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2681

def admin_update_identity(id, opts = {})
  data, _status_code, _headers = admin_update_identity_with_http_info(id, opts)
  data
end

#admin_update_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>

Update an Identity This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](www.ory.sh/docs/next/kratos/concepts/identity-user-model).

Parameters:

  • id (String)

    ID must be set to the ID of identity you want to update

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Identity data, response status code and response headers



2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2692

def admin_update_identity_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_identity ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_update_identity"
  end
  # resource path
  local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])
  # 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[:'admin_update_identity_body'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_update_identity",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_update_json_web_key(set, kid, opts = {}) ⇒ JsonWebKey

Update a JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Options Hash (opts):

Returns:



2752
2753
2754
2755
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2752

def admin_update_json_web_key(set, kid, opts = {})
  data, _status_code, _headers = admin_update_json_web_key_with_http_info(set, kid, opts)
  data
end

#admin_update_json_web_key_set(set, opts = {}) ⇒ JsonWebKeySet

Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Options Hash (opts):

Returns:



2827
2828
2829
2830
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2827

def admin_update_json_web_key_set(set, opts = {})
  data, _status_code, _headers = admin_update_json_web_key_set_with_http_info(set, opts)
  data
end

#admin_update_json_web_key_set_with_http_info(set, opts = {}) ⇒ Array<(JsonWebKeySet, Integer, Hash)>

Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JsonWebKeySet data, response status code and response headers



2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2838

def admin_update_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_update_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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'])
  # 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[:'json_web_key_set'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_update_json_web_key_set",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_update_json_web_key_with_http_info(set, kid, opts = {}) ⇒ Array<(JsonWebKey, Integer, Hash)>

Update a JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JsonWebKey data, response status code and response headers



2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2764

def admin_update_json_web_key_with_http_info(set, kid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_json_web_key ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_update_json_web_key"
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling V0alpha2Api.admin_update_json_web_key"
  end
  # resource path
  local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.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'])
  # 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[:'json_web_key'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_update_json_web_key",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#admin_update_o_auth2_client(id, o_auth2_client, opts = {}) ⇒ OAuth2Client

Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:



2897
2898
2899
2900
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2897

def admin_update_o_auth2_client(id, o_auth2_client, opts = {})
  data, _status_code, _headers = admin_update_o_auth2_client_with_http_info(id, o_auth2_client, opts)
  data
end

#admin_update_o_auth2_client_with_http_info(id, o_auth2_client, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2908

def admin_update_o_auth2_client_with_http_info(id, o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_update_o_auth2_client"
  end
  # verify the required parameter 'o_auth2_client' is set
  if @api_client.config.client_side_validation && o_auth2_client.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.admin_update_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])
  # 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(o_auth2_client)

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.admin_update_o_auth2_client",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project(opts = {}) ⇒ Project

Create a Project Creates a new project.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



2970
2971
2972
2973
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2970

def create_project(opts = {})
  data, _status_code, _headers = create_project_with_http_info(opts)
  data
end

#create_project_api_key(project, opts = {}) ⇒ ProjectApiKey

Create API Token Create an API token for a project.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Options Hash (opts):

Returns:



3035
3036
3037
3038
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3035

def create_project_api_key(project, opts = {})
  data, _status_code, _headers = create_project_api_key_with_http_info(project, opts)
  data
end

#create_project_api_key_with_http_info(project, opts = {}) ⇒ Array<(ProjectApiKey, Integer, Hash)>

Create API Token Create an API token for a project.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Options Hash (opts):

Returns:

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

    ProjectApiKey data, response status code and response headers



3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3046

def create_project_api_key_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_project_api_key ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling V0alpha2Api.create_project_api_key"
  end
  # resource path
  local_var_path = '/projects/{project}/tokens'.sub('{' + 'project' + '}', CGI.escape(project.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'])
  # 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_project_api_key_request'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.create_project_api_key",
    :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: V0alpha2Api#create_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>

Create a Project Creates a new project.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Project data, response status code and response headers



2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
# File 'lib/ory-client/api/v0alpha2_api.rb', line 2980

def create_project_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_project ...'
  end
  # resource path
  local_var_path = '/projects'

  # 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'])
  # 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_project_body'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.create_project",
    :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: V0alpha2Api#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_self_service_logout_flow_url_for_browsers(opts = {}) ⇒ SelfServiceLogoutUrl

Create a Logout URL for Browsers This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, …). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.

Returns:



3104
3105
3106
3107
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3104

def create_self_service_logout_flow_url_for_browsers(opts = {})
  data, _status_code, _headers = create_self_service_logout_flow_url_for_browsers_with_http_info(opts)
  data
end

#create_self_service_logout_flow_url_for_browsers_with_http_info(opts = {}) ⇒ Array<(SelfServiceLogoutUrl, Integer, Hash)>

Create a Logout URL for Browsers This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, …). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.

Returns:

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

    SelfServiceLogoutUrl data, response status code and response headers



3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3114

def create_self_service_logout_flow_url_for_browsers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_self_service_logout_flow_url_for_browsers ...'
  end
  # resource path
  local_var_path = '/self-service/logout/browser'

  # 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'])
  header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.create_self_service_logout_flow_url_for_browsers",
    :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: V0alpha2Api#create_self_service_logout_flow_url_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_project_api_key(project, token_id, opts = {}) ⇒ nil

Delete API Token Deletes an API Token and immediately removes it.

Parameters:

  • project (String)

    The Project ID or Project slug

  • token_id (String)

    The Token ID

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

    the optional parameters

Returns:

  • (nil)


3165
3166
3167
3168
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3165

def delete_project_api_key(project, token_id, opts = {})
  delete_project_api_key_with_http_info(project, token_id, opts)
  nil
end

#delete_project_api_key_with_http_info(project, token_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete API Token Deletes an API Token and immediately removes it.

Parameters:

  • project (String)

    The Project ID or Project slug

  • token_id (String)

    The Token ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3176

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.delete_project_api_key",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#delete_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#discover_json_web_keys(opts = {}) ⇒ JsonWebKeySet

Discover JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](github.com/auth0/node-jwks-rsa) among others.

Parameters:

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

    the optional parameters

Returns:



3232
3233
3234
3235
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3232

def discover_json_web_keys(opts = {})
  data, _status_code, _headers = discover_json_web_keys_with_http_info(opts)
  data
end

#discover_json_web_keys_with_http_info(opts = {}) ⇒ Array<(JsonWebKeySet, Integer, Hash)>

Discover JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](github.com/auth0/node-jwks-rsa) among others.

Parameters:

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3241

def discover_json_web_keys_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.discover_json_web_keys ...'
  end
  # resource path
  local_var_path = '/.well-known/jwks.json'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.discover_json_web_keys",
    :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: V0alpha2Api#discover_json_web_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#discover_oidc_configuration(opts = {}) ⇒ OidcConfiguration

OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: openid.net/developers/certified/

Parameters:

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

    the optional parameters

Returns:



3289
3290
3291
3292
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3289

def discover_oidc_configuration(opts = {})
  data, _status_code, _headers = discover_oidc_configuration_with_http_info(opts)
  data
end

#discover_oidc_configuration_with_http_info(opts = {}) ⇒ Array<(OidcConfiguration, Integer, Hash)>

OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: openid.net/developers/certified/

Parameters:

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

    the optional parameters

Returns:

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

    OidcConfiguration data, response status code and response headers



3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3298

def discover_oidc_configuration_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.discover_oidc_configuration ...'
  end
  # resource path
  local_var_path = '/.well-known/openid-configuration'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.discover_oidc_configuration",
    :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: V0alpha2Api#discover_oidc_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#dynamic_client_registration_create_o_auth2_client(o_auth2_client, opts = {}) ⇒ OAuth2Client

Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.

Parameters:

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

    the optional parameters

Returns:



3347
3348
3349
3350
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3347

def dynamic_client_registration_create_o_auth2_client(o_auth2_client, opts = {})
  data, _status_code, _headers = dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client, opts)
  data
end

#dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (&#x60;createOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the &#x60;client_secret&#x60; nor the &#x60;client_id&#x60; as those values will be server generated when specifying &#x60;token_endpoint_auth_method&#x60; as &#x60;client_secret_basic&#x60; or &#x60;client_secret_post&#x60;. The &#x60;client_secret&#x60; will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3357

def dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_create_o_auth2_client ...'
  end
  # verify the required parameter 'o_auth2_client' is set
  if @api_client.config.client_side_validation && o_auth2_client.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.dynamic_client_registration_create_o_auth2_client"
  end
  # resource path
  local_var_path = '/oauth2/register'

  # 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'])
  # 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(o_auth2_client)

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.dynamic_client_registration_create_o_auth2_client",
    :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: V0alpha2Api#dynamic_client_registration_create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#dynamic_client_registration_delete_o_auth2_client(id, opts = {}) ⇒ nil

Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

  • (nil)


3415
3416
3417
3418
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3415

def dynamic_client_registration_delete_o_auth2_client(id, opts = {})
  dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts)
  nil
end

#dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (&#x60;deleteOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3425

def dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_delete_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.dynamic_client_registration_delete_o_auth2_client"
  end
  # resource path
  local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.dynamic_client_registration_delete_o_auth2_client",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#dynamic_client_registration_delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#dynamic_client_registration_get_o_auth2_client(id, opts = {}) ⇒ OAuth2Client

Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:



3478
3479
3480
3481
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3478

def dynamic_client_registration_get_o_auth2_client(id, opts = {})
  data, _status_code, _headers = dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts)
  data
end

#dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (&#x60;getOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3488

def dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_get_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.dynamic_client_registration_get_o_auth2_client"
  end
  # resource path
  local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.dynamic_client_registration_get_o_auth2_client",
    :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: V0alpha2Api#dynamic_client_registration_get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#dynamic_client_registration_update_o_auth2_client(id, o_auth2_client, opts = {}) ⇒ OAuth2Client

Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:



3542
3543
3544
3545
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3542

def dynamic_client_registration_update_o_auth2_client(id, o_auth2_client, opts = {})
  data, _status_code, _headers = dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client, opts)
  data
end

#dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (&#x60;updateOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3553

def dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_update_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.dynamic_client_registration_update_o_auth2_client"
  end
  # verify the required parameter 'o_auth2_client' is set
  if @api_client.config.client_side_validation && o_auth2_client.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.dynamic_client_registration_update_o_auth2_client"
  end
  # resource path
  local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])
  # 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(o_auth2_client)

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.dynamic_client_registration_update_o_auth2_client",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#dynamic_client_registration_update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_identity_schema(id, opts = {}) ⇒ Object

Get a JSON Schema

Parameters:

  • id (String)

    ID must be set to the ID of schema you want to get

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

    the optional parameters

Returns:

  • (Object)


3614
3615
3616
3617
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3614

def get_identity_schema(id, opts = {})
  data, _status_code, _headers = get_identity_schema_with_http_info(id, opts)
  data
end

#get_identity_schema_with_http_info(id, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Get a JSON Schema

Parameters:

  • id (String)

    ID must be set to the ID of schema you want to get

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3623

def get_identity_schema_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_identity_schema ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_identity_schema"
  end
  # resource path
  local_var_path = '/schemas/{id}'.sub('{' + 'id' + '}', CGI.escape(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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_identity_schema",
    :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: V0alpha2Api#get_identity_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_oidc_user_info(opts = {}) ⇒ OidcUserInfo

OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](openid.net/specs/openid-connect-core-1_0.html#UserInfo). In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.

Parameters:

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

    the optional parameters

Returns:



3675
3676
3677
3678
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3675

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

#get_oidc_user_info_with_http_info(opts = {}) ⇒ Array<(OidcUserInfo, Integer, Hash)>

OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](openid.net/specs/openid-connect-core-1_0.html#UserInfo). In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.

Parameters:

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

    the optional parameters

Returns:

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

    OidcUserInfo data, response status code and response headers



3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3684

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_oidc_user_info ...'
  end
  # resource path
  local_var_path = '/userinfo'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_oidc_user_info",
    :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: V0alpha2Api#get_oidc_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project(project_id, opts = {}) ⇒ Project

Get a Project Get a projects you have access to by its ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:



3733
3734
3735
3736
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3733

def get_project(project_id, opts = {})
  data, _status_code, _headers = get_project_with_http_info(project_id, opts)
  data
end

#get_project_members(project_id, opts = {}) ⇒ Array<CloudAccount>

Get all members associated with this project. This endpoint requires the user to be a member of the project with the role `OWNER` or `DEVELOPER`.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:



3796
3797
3798
3799
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3796

def get_project_members(project_id, opts = {})
  data, _status_code, _headers = get_project_members_with_http_info(project_id, opts)
  data
end

#get_project_members_with_http_info(project_id, opts = {}) ⇒ Array<(Array<CloudAccount>, Integer, Hash)>

Get all members associated with this project. This endpoint requires the user to be a member of the project with the role &#x60;OWNER&#x60; or &#x60;DEVELOPER&#x60;.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

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

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



3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3806

def get_project_members_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_project_members ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling V0alpha2Api.get_project_members"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_project_members",
    :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: V0alpha2Api#get_project_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>

Get a Project Get a projects you have access to by its ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

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

    Project data, response status code and response headers



3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3743

def get_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling V0alpha2Api.get_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_project",
    :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: V0alpha2Api#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self_service_error(id, opts = {}) ⇒ SelfServiceError

Get Self-Service Errors This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: `?id=stub:500` - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).

Parameters:

  • id (String)

    Error is the error&#39;s ID

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

    the optional parameters

Returns:



3859
3860
3861
3862
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3859

def get_self_service_error(id, opts = {})
  data, _status_code, _headers = get_self_service_error_with_http_info(id, opts)
  data
end

#get_self_service_error_with_http_info(id, opts = {}) ⇒ Array<(SelfServiceError, Integer, Hash)>

Get Self-Service Errors This endpoint returns the error associated with a user-facing self service errors. This endpoint supports stub values to help you implement the error UI: &#x60;?id&#x3D;stub:500&#x60; - returns a stub 500 (Internal Server Error) error. More information can be found at [Ory Kratos User User Facing Error Documentation](www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).

Parameters:

  • id (String)

    Error is the error&#39;s ID

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

    the optional parameters

Returns:

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

    SelfServiceError data, response status code and response headers



3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3869

def get_self_service_error_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_error ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_error"
  end
  # resource path
  local_var_path = '/self-service/errors'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_self_service_error",
    :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: V0alpha2Api#get_self_service_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self_service_login_flow(id, opts = {}) ⇒ SelfServiceLoginFlow

Get Login Flow This endpoint returns a login flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: “`js pseudo-code example router.get('/login', async function (req, res) { const flow = await client.getSelfServiceLoginFlow(req.header('cookie'), req.query) res.render('login', flow) }) “` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • id (String)

    The Login Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



3924
3925
3926
3927
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3924

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

#get_self_service_login_flow_with_http_info(id, opts = {}) ⇒ Array<(SelfServiceLoginFlow, Integer, Hash)>

Get Login Flow This endpoint returns a login flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/login&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceLoginFlow(req.header(&#39;cookie&#39;), req.query) res.render(&#39;login&#39;, flow) }) &#x60;&#x60;&#x60; This request may fail due to several reasons. The &#x60;error.id&#x60; can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;self_service_flow_expired&#x60;: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • id (String)

    The Login Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceLoginFlow data, response status code and response headers



3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3935

def (id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_login_flow ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_login_flow"
  end
  # resource path
  local_var_path = '/self-service/login/flows'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_self_service_login_flow",
    :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: V0alpha2Api#get_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self_service_recovery_flow(id, opts = {}) ⇒ SelfServiceRecoveryFlow

Get Recovery Flow This endpoint returns a recovery flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: “`js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceRecoveryFlow(req.header('Cookie'), req.query) res.render('recovery', flow) }) “` More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

  • id (String)

    The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



3991
3992
3993
3994
# File 'lib/ory-client/api/v0alpha2_api.rb', line 3991

def get_self_service_recovery_flow(id, opts = {})
  data, _status_code, _headers = get_self_service_recovery_flow_with_http_info(id, opts)
  data
end

#get_self_service_recovery_flow_with_http_info(id, opts = {}) ⇒ Array<(SelfServiceRecoveryFlow, Integer, Hash)>

Get Recovery Flow This endpoint returns a recovery flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/recovery&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceRecoveryFlow(req.header(&#39;Cookie&#39;), req.query) res.render(&#39;recovery&#39;, flow) }) &#x60;&#x60;&#x60; More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

  • id (String)

    The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceRecoveryFlow data, response status code and response headers



4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4002

def get_self_service_recovery_flow_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_recovery_flow ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_recovery_flow"
  end
  # resource path
  local_var_path = '/self-service/recovery/flows'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_self_service_recovery_flow",
    :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: V0alpha2Api#get_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self_service_registration_flow(id, opts = {}) ⇒ SelfServiceRegistrationFlow

Get Registration Flow This endpoint returns a registration flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: “`js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getSelfServiceRegistrationFlow(req.header('cookie'), req.query) res.render('registration', flow) }) “` This request may fail due to several reasons. The `error.id` can be one of: `session_already_available`: The user is already signed in. `self_service_flow_expired`: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • id (String)

    The Registration Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



4058
4059
4060
4061
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4058

def get_self_service_registration_flow(id, opts = {})
  data, _status_code, _headers = get_self_service_registration_flow_with_http_info(id, opts)
  data
end

#get_self_service_registration_flow_with_http_info(id, opts = {}) ⇒ Array<(SelfServiceRegistrationFlow, Integer, Hash)>

Get Registration Flow This endpoint returns a registration flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/registration&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceRegistrationFlow(req.header(&#39;cookie&#39;), req.query) res.render(&#39;registration&#39;, flow) }) &#x60;&#x60;&#x60; This request may fail due to several reasons. The &#x60;error.id&#x60; can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;self_service_flow_expired&#x60;: The flow is expired and you should request a new one. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • id (String)

    The Registration Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceRegistrationFlow data, response status code and response headers



4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4069

def get_self_service_registration_flow_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_registration_flow ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_registration_flow"
  end
  # resource path
  local_var_path = '/self-service/registration/flows'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_self_service_registration_flow",
    :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: V0alpha2Api#get_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self_service_settings_flow(id, opts = {}) ⇒ SelfServiceSettingsFlow

Get Settings Flow When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos' Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

  • id (String)

    ID is the Settings Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token When using the SDK in an app without a browser, please include the session token here.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



4126
4127
4128
4129
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4126

def get_self_service_settings_flow(id, opts = {})
  data, _status_code, _headers = get_self_service_settings_flow_with_http_info(id, opts)
  data
end

#get_self_service_settings_flow_with_http_info(id, opts = {}) ⇒ Array<(SelfServiceSettingsFlow, Integer, Hash)>

Get Settings Flow When accessing this endpoint through Ory Kratos&#39; Public API you must ensure that either the Ory Kratos Session Cookie or the Ory Kratos Session Token are set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. You can access this endpoint without credentials when using Ory Kratos&#39; Admin API. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;session_inactive&#x60;: No Ory Session was found - sign in a user first. &#x60;security_identity_mismatch&#x60;: The flow was interrupted with &#x60;session_refresh_required&#x60; but apparently some other identity logged in instead. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

  • id (String)

    ID is the Settings Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token When using the SDK in an app without a browser, please include the session token here.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceSettingsFlow data, response status code and response headers



4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4138

def get_self_service_settings_flow_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_settings_flow ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_settings_flow"
  end
  # resource path
  local_var_path = '/self-service/settings/flows'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
  header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_self_service_settings_flow",
    :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: V0alpha2Api#get_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_self_service_verification_flow(id, opts = {}) ⇒ SelfServiceVerificationFlow

Get Verification Flow This endpoint returns a verification flow's context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: “`js pseudo-code example router.get('/recovery', async function (req, res) { const flow = await client.getSelfServiceVerificationFlow(req.header('cookie'), req.query) res.render('verification', flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).

Parameters:

  • id (String)

    The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.

Returns:



4195
4196
4197
4198
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4195

def get_self_service_verification_flow(id, opts = {})
  data, _status_code, _headers = get_self_service_verification_flow_with_http_info(id, opts)
  data
end

#get_self_service_verification_flow_with_http_info(id, opts = {}) ⇒ Array<(SelfServiceVerificationFlow, Integer, Hash)>

Get Verification Flow This endpoint returns a verification flow&#39;s context with, for example, error details and other information. Browser flows expect the anti-CSRF cookie to be included in the request&#39;s HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail. If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/recovery&#39;, async function (req, res) { const flow &#x3D; await client.getSelfServiceVerificationFlow(req.header(&#39;cookie&#39;), req.query) res.render(&#39;verification&#39;, flow) }) More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).

Parameters:

  • id (String)

    The Flow ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.

Returns:

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

    SelfServiceVerificationFlow data, response status code and response headers



4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4206

def get_self_service_verification_flow_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_self_service_verification_flow ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_self_service_verification_flow"
  end
  # resource path
  local_var_path = '/self-service/verification/flows'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_self_service_verification_flow",
    :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: V0alpha2Api#get_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_web_authn_java_script(opts = {}) ⇒ String

Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: “`html <script src="public-kratos.example.org/.well-known/ory/webauthn.js" type="script" async /> “` More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Returns:

  • (String)


4260
4261
4262
4263
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4260

def get_web_authn_java_script(opts = {})
  data, _status_code, _headers = get_web_authn_java_script_with_http_info(opts)
  data
end

#get_web_authn_java_script_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>

Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: &#x60;&#x60;&#x60;html &lt;script src&#x3D;&quot;public-kratos.example.org/.well-known/ory/webauthn.js"; type&#x3D;&quot;script&quot; async /&gt; &#x60;&#x60;&#x60; More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4269

def get_web_authn_java_script_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_web_authn_java_script ...'
  end
  # resource path
  local_var_path = '/.well-known/ory/webauthn.js'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.get_web_authn_java_script",
    :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: V0alpha2Api#get_web_authn_java_script\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_login_flow_for_browsers(opts = {}) ⇒ SelfServiceLoginFlow

Initialize Login Flow for Browsers This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter `?refresh=true` was set. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :refresh (Boolean)

    Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session.

  • :aal (String)

    Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to &quot;upgrade&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ … you would set this to &quot;aal2&quot;.

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



4321
4322
4323
4324
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4321

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

#initialize_self_service_login_flow_for_browsers_with_http_info(opts = {}) ⇒ Array<(SelfServiceLoginFlow, Integer, Hash)>

Initialize Login Flow for Browsers This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. If this endpoint is opened as a link in the browser, it will be redirected to &#x60;selfservice.flows.login.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60; unless the query parameter &#x60;?refresh&#x3D;true&#x60; was set. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;session_aal1_required&#x60;: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;security_identity_mismatch&#x60;: The requested &#x60;?return_to&#x60; address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :refresh (Boolean)

    Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session.

  • :aal (String)

    Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to &quot;upgrade&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ … you would set this to &quot;aal2&quot;.

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceLoginFlow data, response status code and response headers



4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4334

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_login_flow_for_browsers ...'
  end
  # resource path
  local_var_path = '/self-service/login/browser'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
  query_params[:'aal'] = opts[:'aal'] if !opts[:'aal'].nil?
  query_params[:'return_to'] = opts[:'return_to'] if !opts[:'return_to'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_login_flow_for_browsers",
    :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: V0alpha2Api#initialize_self_service_login_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_login_flow_without_browser(opts = {}) ⇒ SelfServiceLoginFlow

Initialize Login Flow for APIs, Services, Apps, … This endpoint initiates a login flow for API clients that do not use a browser, such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :refresh (Boolean)

    Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session.

  • :aal (String)

    Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to &quot;upgrade&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ … you would set this to &quot;aal2&quot;.

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

Returns:



4389
4390
4391
4392
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4389

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

#initialize_self_service_login_flow_without_browser_with_http_info(opts = {}) ⇒ Array<(SelfServiceLoginFlow, Integer, Hash)>

Initialize Login Flow for APIs, Services, Apps, … This endpoint initiates a login flow for API clients that do not use a browser, such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter &#x60;?refresh&#x3D;true&#x60; is set. To fetch an existing login flow call &#x60;/self-service/login/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks, including CSRF login attacks. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;session_aal1_required&#x60;: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :refresh (Boolean)

    Refresh a login session If set to true, this will refresh an existing login session by asking the user to sign in again. This will reset the authenticated_at time of the session.

  • :aal (String)

    Request a Specific AuthenticationMethod Assurance Level Use this parameter to upgrade an existing session&#39;s authenticator assurance level (AAL). This allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password, the AAL is 1. If you wish to &quot;upgrade&quot; the session&#39;s security by asking the user to perform TOTP / WebAuth/ … you would set this to &quot;aal2&quot;.

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

Returns:

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

    SelfServiceLoginFlow data, response status code and response headers



4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4401

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_login_flow_without_browser ...'
  end
  # resource path
  local_var_path = '/self-service/login/api'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
  query_params[:'aal'] = opts[:'aal'] if !opts[:'aal'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_login_flow_without_browser",
    :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: V0alpha2Api#initialize_self_service_login_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_recovery_flow_for_browsers(opts = {}) ⇒ SelfServiceRecoveryFlow

Initialize Recovery Flow for Browsers This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists, the browser is returned to the configured return URL. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

Returns:



4453
4454
4455
4456
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4453

def initialize_self_service_recovery_flow_for_browsers(opts = {})
  data, _status_code, _headers = initialize_self_service_recovery_flow_for_browsers_with_http_info(opts)
  data
end

#initialize_self_service_recovery_flow_for_browsers_with_http_info(opts = {}) ⇒ Array<(SelfServiceRecoveryFlow, Integer, Hash)>

Initialize Recovery Flow for Browsers This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.recovery.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists, the browser is returned to the configured return URL. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

Returns:

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

    SelfServiceRecoveryFlow data, response status code and response headers



4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4463

def initialize_self_service_recovery_flow_for_browsers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_recovery_flow_for_browsers ...'
  end
  # resource path
  local_var_path = '/self-service/recovery/browser'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'return_to'] = opts[:'return_to'] if !opts[:'return_to'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_recovery_flow_for_browsers",
    :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: V0alpha2Api#initialize_self_service_recovery_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_recovery_flow_without_browser(opts = {}) ⇒ SelfServiceRecoveryFlow

Initialize Recovery Flow for APIs, Services, Apps, … This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

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

    the optional parameters

Returns:



4512
4513
4514
4515
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4512

def initialize_self_service_recovery_flow_without_browser(opts = {})
  data, _status_code, _headers = initialize_self_service_recovery_flow_without_browser_with_http_info(opts)
  data
end

#initialize_self_service_recovery_flow_without_browser_with_http_info(opts = {}) ⇒ Array<(SelfServiceRecoveryFlow, Integer, Hash)>

Initialize Recovery Flow for APIs, Services, Apps, … This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. To fetch an existing recovery flow call &#x60;/self-service/recovery/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

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

    the optional parameters

Returns:

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

    SelfServiceRecoveryFlow data, response status code and response headers



4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4521

def initialize_self_service_recovery_flow_without_browser_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_recovery_flow_without_browser ...'
  end
  # resource path
  local_var_path = '/self-service/recovery/api'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_recovery_flow_without_browser",
    :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: V0alpha2Api#initialize_self_service_recovery_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_registration_flow_for_browsers(opts = {}) ⇒ SelfServiceRegistrationFlow

Initialize Registration Flow for Browsers

This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. :

If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

Returns:



4570
4571
4572
4573
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4570

def initialize_self_service_registration_flow_for_browsers(opts = {})
  data, _status_code, _headers = initialize_self_service_registration_flow_for_browsers_with_http_info(opts)
  data
end

#initialize_self_service_registration_flow_for_browsers_with_http_info(opts = {}) ⇒ Array<(SelfServiceRegistrationFlow, Integer, Hash)>

Initialize Registration Flow for Browsers

This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate cookies and anti-CSRF measures required for browser-based flows. :::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. :

If this endpoint is opened as a link in the browser, it will be redirected to &#x60;selfservice.flows.registration.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60;. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;security_identity_mismatch&#x60;: The requested &#x60;?return_to&#x60; address is not allowed to be used. Adjust this in the configuration! If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect. This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

Returns:

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

    SelfServiceRegistrationFlow data, response status code and response headers



4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4580

def initialize_self_service_registration_flow_for_browsers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_registration_flow_for_browsers ...'
  end
  # resource path
  local_var_path = '/self-service/registration/browser'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'return_to'] = opts[:'return_to'] if !opts[:'return_to'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_registration_flow_for_browsers",
    :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: V0alpha2Api#initialize_self_service_registration_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_registration_flow_without_browser(opts = {}) ⇒ SelfServiceRegistrationFlow

Initialize Registration Flow for APIs, Services, Apps, … This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter `?refresh=true` is set. To fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Returns:



4629
4630
4631
4632
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4629

def initialize_self_service_registration_flow_without_browser(opts = {})
  data, _status_code, _headers = initialize_self_service_registration_flow_without_browser_with_http_info(opts)
  data
end

#initialize_self_service_registration_flow_without_browser_with_http_info(opts = {}) ⇒ Array<(SelfServiceRegistrationFlow, Integer, Hash)>

Initialize Registration Flow for APIs, Services, Apps, … This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error will be returned unless the URL query parameter &#x60;?refresh&#x3D;true&#x60; is set. To fetch an existing registration flow call &#x60;/self-service/registration/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

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

    the optional parameters

Returns:

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

    SelfServiceRegistrationFlow data, response status code and response headers



4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4638

def initialize_self_service_registration_flow_without_browser_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_registration_flow_without_browser ...'
  end
  # resource path
  local_var_path = '/self-service/registration/api'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_registration_flow_without_browser",
    :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: V0alpha2Api#initialize_self_service_registration_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_settings_flow_for_browsers(opts = {}) ⇒ SelfServiceSettingsFlow

Initialize Settings Flow for Browsers This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. If this endpoint is opened as a link in the browser, it will be redirected to `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 401 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



4688
4689
4690
4691
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4688

def initialize_self_service_settings_flow_for_browsers(opts = {})
  data, _status_code, _headers = initialize_self_service_settings_flow_for_browsers_with_http_info(opts)
  data
end

#initialize_self_service_settings_flow_for_browsers_with_http_info(opts = {}) ⇒ Array<(SelfServiceSettingsFlow, Integer, Hash)>

Initialize Settings Flow for Browsers This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.settings.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If no valid Ory Kratos Session Cookie is included in the request, a login flow will be initialized. If this endpoint is opened as a link in the browser, it will be redirected to &#x60;selfservice.flows.settings.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If no valid user session was set, the browser will be redirected to the login endpoint. If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects or a 401 forbidden error if no valid session was set. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;session_inactive&#x60;: No Ory Session was found - sign in a user first. &#x60;security_identity_mismatch&#x60;: The requested &#x60;?return_to&#x60; address is not allowed to be used. Adjust this in the configuration! This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, …) as cookies are needed. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceSettingsFlow data, response status code and response headers



4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4699

def initialize_self_service_settings_flow_for_browsers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_settings_flow_for_browsers ...'
  end
  # resource path
  local_var_path = '/self-service/settings/browser'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'return_to'] = opts[:'return_to'] if !opts[:'return_to'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_settings_flow_for_browsers",
    :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: V0alpha2Api#initialize_self_service_settings_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_settings_flow_without_browser(opts = {}) ⇒ SelfServiceSettingsFlow

Initialize Settings Flow for APIs, Services, Apps, … This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. In the case of an error, the `error.id` of the JSON response body can be one of: `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

Returns:



4750
4751
4752
4753
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4750

def initialize_self_service_settings_flow_without_browser(opts = {})
  data, _status_code, _headers = initialize_self_service_settings_flow_without_browser_with_http_info(opts)
  data
end

#initialize_self_service_settings_flow_without_browser_with_http_info(opts = {}) ⇒ Array<(SelfServiceSettingsFlow, Integer, Hash)>

Initialize Settings Flow for APIs, Services, Apps, … This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on. You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK. To fetch an existing settings flow call &#x60;/self-service/settings/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;session_inactive&#x60;: No Ory Session was found - sign in a user first. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

Returns:

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

    SelfServiceSettingsFlow data, response status code and response headers



4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4760

def initialize_self_service_settings_flow_without_browser_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_settings_flow_without_browser ...'
  end
  # resource path
  local_var_path = '/self-service/settings/api'

  # 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'])
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_settings_flow_without_browser",
    :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: V0alpha2Api#initialize_self_service_settings_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_verification_flow_for_browsers(opts = {}) ⇒ SelfServiceVerificationFlow

Initialize Verification Flow for Browser Clients This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, …). More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

Returns:



4810
4811
4812
4813
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4810

def initialize_self_service_verification_flow_for_browsers(opts = {})
  data, _status_code, _headers = initialize_self_service_verification_flow_for_browsers_with_http_info(opts)
  data
end

#initialize_self_service_verification_flow_for_browsers_with_http_info(opts = {}) ⇒ Array<(SelfServiceVerificationFlow, Integer, Hash)>

Initialize Verification Flow for Browser Clients This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to &#x60;selfservice.flows.verification.ui_url&#x60; with the flow ID set as the query parameter &#x60;?flow&#x3D;&#x60;. If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, …). More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :return_to (String)

    The URL to return the browser to after the flow was completed.

Returns:

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

    SelfServiceVerificationFlow data, response status code and response headers



4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4820

def initialize_self_service_verification_flow_for_browsers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_verification_flow_for_browsers ...'
  end
  # resource path
  local_var_path = '/self-service/verification/browser'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'return_to'] = opts[:'return_to'] if !opts[:'return_to'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_verification_flow_for_browsers",
    :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: V0alpha2Api#initialize_self_service_verification_flow_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initialize_self_service_verification_flow_without_browser(opts = {}) ⇒ SelfServiceVerificationFlow

Initialize Verification Flow for APIs, Services, Apps, … This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).

Parameters:

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

    the optional parameters

Returns:



4869
4870
4871
4872
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4869

def initialize_self_service_verification_flow_without_browser(opts = {})
  data, _status_code, _headers = initialize_self_service_verification_flow_without_browser_with_http_info(opts)
  data
end

#initialize_self_service_verification_flow_without_browser_with_http_info(opts = {}) ⇒ Array<(SelfServiceVerificationFlow, Integer, Hash)>

Initialize Verification Flow for APIs, Services, Apps, … This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call &#x60;/self-service/verification/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, …) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, …). More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).

Parameters:

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

    the optional parameters

Returns:

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

    SelfServiceVerificationFlow data, response status code and response headers



4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4878

def initialize_self_service_verification_flow_without_browser_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.initialize_self_service_verification_flow_without_browser ...'
  end
  # resource path
  local_var_path = '/self-service/verification/api'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.initialize_self_service_verification_flow_without_browser",
    :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: V0alpha2Api#initialize_self_service_verification_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_identity_schemas(opts = {}) ⇒ Array<IdentitySchemaContainer>

Get all Identity Schemas

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

Returns:



4927
4928
4929
4930
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4927

def list_identity_schemas(opts = {})
  data, _status_code, _headers = list_identity_schemas_with_http_info(opts)
  data
end

#list_identity_schemas_with_http_info(opts = {}) ⇒ Array<(Array<IdentitySchemaContainer>, Integer, Hash)>

Get all Identity Schemas

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

Returns:

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

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



4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
# File 'lib/ory-client/api/v0alpha2_api.rb', line 4937

def list_identity_schemas_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.list_identity_schemas ...'
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.list_identity_schemas, must be smaller than or equal to 1000.'
  end

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

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

  # resource path
  local_var_path = '/schemas'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.list_identity_schemas",
    :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: V0alpha2Api#list_identity_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_project_api_keys(project, opts = {}) ⇒ Array<ProjectApiKey>

List a Project's API Tokens A list of all the project's API tokens.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Returns:



5000
5001
5002
5003
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5000

def list_project_api_keys(project, opts = {})
  data, _status_code, _headers = list_project_api_keys_with_http_info(project, opts)
  data
end

#list_project_api_keys_with_http_info(project, opts = {}) ⇒ Array<(Array<ProjectApiKey>, Integer, Hash)>

List a Project&#39;s API Tokens A list of all the project&#39;s API tokens.

Parameters:

  • project (String)

    The Project ID or Project slug

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

    the optional parameters

Returns:

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

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



5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5010

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.list_project_api_keys",
    :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: V0alpha2Api#list_project_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_projects(opts = {}) ⇒ Array<ProjectMetadata>

List All Projects Lists all projects you have access to.

Parameters:

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

    the optional parameters

Returns:



5062
5063
5064
5065
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5062

def list_projects(opts = {})
  data, _status_code, _headers = list_projects_with_http_info(opts)
  data
end

#list_projects_with_http_info(opts = {}) ⇒ Array<(Array<ProjectMetadata>, Integer, Hash)>

List All Projects Lists all projects you have access to.

Parameters:

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

    the optional parameters

Returns:

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

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



5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5071

def list_projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.list_projects ...'
  end
  # resource path
  local_var_path = '/projects'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.list_projects",
    :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: V0alpha2Api#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the `/sessions/whoami` endpoint. This endpoint is useful for: Displaying all other sessions that belong to the logged-in user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.

  • :cookie (String)

    Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

Returns:



5123
5124
5125
5126
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5123

def list_sessions(opts = {})
  data, _status_code, _headers = list_sessions_with_http_info(opts)
  data
end

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

This endpoints returns all other active sessions that belong to the logged-in user. The current session can be retrieved by calling the &#x60;/sessions/whoami&#x60; endpoint. This endpoint is useful for: Displaying all other sessions that belong to the logged-in user

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.

  • :cookie (String)

    Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.

  • :per_page (Integer)

    Items per Page This is the number of items per page. (default to 250)

  • :page (Integer)

    Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)

Returns:

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

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



5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5136

def list_sessions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.list_sessions ...'
  end
  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.list_sessions, must be smaller than or equal to 1000.'
  end

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

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

  # resource path
  local_var_path = '/sessions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
  header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

  # 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] || []

  new_options = opts.merge(
    :operation => :"V0alpha2Api.list_sessions",
    :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: V0alpha2Api#list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_project(project_id, opts = {}) ⇒ SuccessfulProjectUpdate

Patch an Ory Cloud Project Configuration` Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Cloud Project configuration keys for Ory's services (identity, permission, …). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



5202
5203
5204
5205
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5202

def patch_project(project_id, opts = {})
  data, _status_code, _headers = patch_project_with_http_info(project_id, opts)
  data
end

#patch_project_with_http_info(project_id, opts = {}) ⇒ Array<(SuccessfulProjectUpdate, Integer, Hash)>

Patch an Ory Cloud Project Configuration&#x60; Deprecated: Use the &#x60;patchProjectWithRevision&#x60; endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Cloud Project configuration keys for Ory&#39;s services (identity, permission, …). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SuccessfulProjectUpdate data, response status code and response headers



5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5213

def patch_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.patch_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling V0alpha2Api.patch_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])
  # 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[:'json_patch'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.patch_project",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#perform_o_auth2_authorization_flow(opts = {}) ⇒ OAuth2ApiError

The OAuth 2.0 Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: tools.ietf.org/html/rfc6749

Parameters:

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

    the optional parameters

Returns:



5270
5271
5272
5273
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5270

def perform_o_auth2_authorization_flow(opts = {})
  data, _status_code, _headers = perform_o_auth2_authorization_flow_with_http_info(opts)
  data
end

#perform_o_auth2_authorization_flow_with_http_info(opts = {}) ⇒ Array<(OAuth2ApiError, Integer, Hash)>

The OAuth 2.0 Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: tools.ietf.org/html/rfc6749

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2ApiError data, response status code and response headers



5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5279

def perform_o_auth2_authorization_flow_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.perform_o_auth2_authorization_flow ...'
  end
  # resource path
  local_var_path = '/oauth2/auth'

  # 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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.perform_o_auth2_authorization_flow",
    :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: V0alpha2Api#perform_o_auth2_authorization_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#perform_o_auth2_token_flow(grant_type, opts = {}) ⇒ OAuth2TokenResponse

The OAuth 2.0 Token Endpoint The client makes a request to the token endpoint by sending the following parameters using the "application/x-www-form-urlencoded" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :code (String)
  • :redirect_uri (String)
  • :refresh_token (String)

Returns:



5332
5333
5334
5335
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5332

def perform_o_auth2_token_flow(grant_type, opts = {})
  data, _status_code, _headers = perform_o_auth2_token_flow_with_http_info(grant_type, opts)
  data
end

#perform_o_auth2_token_flow_with_http_info(grant_type, opts = {}) ⇒ Array<(OAuth2TokenResponse, Integer, Hash)>

The OAuth 2.0 Token Endpoint The client makes a request to the token endpoint by sending the following parameters using the &quot;application/x-www-form-urlencoded&quot; HTTP request entity-body. &gt; Do not implement a client for this endpoint yourself. Use a library. There are many libraries &gt; available for any programming language. You can find a list of libraries here: oauth.net/code/ &gt; &gt; Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :code (String)
  • :redirect_uri (String)
  • :refresh_token (String)

Returns:

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

    OAuth2TokenResponse data, response status code and response headers



5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5346

def perform_o_auth2_token_flow_with_http_info(grant_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.perform_o_auth2_token_flow ...'
  end
  # verify the required parameter 'grant_type' is set
  if @api_client.config.client_side_validation && grant_type.nil?
    fail ArgumentError, "Missing the required parameter 'grant_type' when calling V0alpha2Api.perform_o_auth2_token_flow"
  end
  # resource path
  local_var_path = '/oauth2/token'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['grant_type'] = grant_type
  form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
  form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
  form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?

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

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic', 'oauth2']

  new_options = opts.merge(
    :operation => :"V0alpha2Api.perform_o_auth2_token_flow",
    :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: V0alpha2Api#perform_o_auth2_token_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#perform_oidc_front_or_back_channel_logout(opts = {}) ⇒ nil

OpenID Connect Front- or Back-channel Enabled Logout This endpoint initiates and completes user logout at Ory Hydra and initiates OpenID Connect Front- / Back-channel logout: openid.net/specs/openid-connect-frontchannel-1_0.html openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


5408
5409
5410
5411
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5408

def perform_oidc_front_or_back_channel_logout(opts = {})
  perform_oidc_front_or_back_channel_logout_with_http_info(opts)
  nil
end

#perform_oidc_front_or_back_channel_logout_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

OpenID Connect Front- or Back-channel Enabled Logout This endpoint initiates and completes user logout at Ory Hydra and initiates OpenID Connect Front- / Back-channel logout: openid.net/specs/openid-connect-frontchannel-1_0.html openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5417

def perform_oidc_front_or_back_channel_logout_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.perform_oidc_front_or_back_channel_logout ...'
  end
  # resource path
  local_var_path = '/oauth2/sessions/logout'

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.perform_oidc_front_or_back_channel_logout",
    :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: V0alpha2Api#perform_oidc_front_or_back_channel_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#purge_project(project_id, opts = {}) ⇒ nil

Irrecoverably Purge a Project !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


5464
5465
5466
5467
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5464

def purge_project(project_id, opts = {})
  purge_project_with_http_info(project_id, opts)
  nil
end

#purge_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Irrecoverably Purge a Project !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5474

def purge_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.purge_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling V0alpha2Api.purge_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.purge_project",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#purge_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_project_member(project_id, member_id, opts = {}) ⇒ nil

Remove a member associated with this project. This also sets their invite status to `REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • member_id (String)

    Member ID

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

    the optional parameters

Returns:

  • (nil)


5528
5529
5530
5531
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5528

def remove_project_member(project_id, member_id, opts = {})
  remove_project_member_with_http_info(project_id, member_id, opts)
  nil
end

#remove_project_member_with_http_info(project_id, member_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove a member associated with this project. This also sets their invite status to &#x60;REMOVED&#x60;. This endpoint requires the user to be a member of the project with the role &#x60;OWNER&#x60;.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • member_id (String)

    Member ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5539

def remove_project_member_with_http_info(project_id, member_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.remove_project_member ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling V0alpha2Api.remove_project_member"
  end
  # verify the required parameter 'member_id' is set
  if @api_client.config.client_side_validation && member_id.nil?
    fail ArgumentError, "Missing the required parameter 'member_id' when calling V0alpha2Api.remove_project_member"
  end
  # resource path
  local_var_path = '/projects/{project_id}/members/{member_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'member_id' + '}', CGI.escape(member_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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.remove_project_member",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#remove_project_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_o_auth2_token(token, opts = {}) ⇒ nil

Revoke an OAuth2 Access or Refresh Token Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


5596
5597
5598
5599
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5596

def revoke_o_auth2_token(token, opts = {})
  revoke_o_auth2_token_with_http_info(token, opts)
  nil
end

#revoke_o_auth2_token_with_http_info(token, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Revoke an OAuth2 Access or Refresh Token Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5606

def revoke_o_auth2_token_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.revoke_o_auth2_token ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling V0alpha2Api.revoke_o_auth2_token"
  end
  # resource path
  local_var_path = '/oauth2/revoke'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic', 'oauth2']

  new_options = opts.merge(
    :operation => :"V0alpha2Api.revoke_o_auth2_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: V0alpha2Api#revoke_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_session(id, opts = {}) ⇒ nil

Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted. This endpoint is useful for: To forcefully logout the current user from another device or session

Parameters:

  • id (String)

    ID is the session&#39;s ID.

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

    the optional parameters

Returns:

  • (nil)


5665
5666
5667
5668
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5665

def revoke_session(id, opts = {})
  revoke_session_with_http_info(id, opts)
  nil
end

#revoke_session_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted. This endpoint is useful for: To forcefully logout the current user from another device or session

Parameters:

  • id (String)

    ID is the session&#39;s ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5675

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#revoke_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_sessions(opts = {}) ⇒ RevokedSessions

Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted. This endpoint is useful for: To forcefully logout the current user from all other devices and sessions

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.

  • :cookie (String)

    Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.

Returns:



5729
5730
5731
5732
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5729

def revoke_sessions(opts = {})
  data, _status_code, _headers = revoke_sessions_with_http_info(opts)
  data
end

#revoke_sessions_with_http_info(opts = {}) ⇒ Array<(RevokedSessions, Integer, Hash)>

Calling this endpoint invalidates all except the current session that belong to the logged-in user. Session data are not deleted. This endpoint is useful for: To forcefully logout the current user from all other devices and sessions

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.

  • :cookie (String)

    Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.

Returns:

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

    RevokedSessions data, response status code and response headers



5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5740

def revoke_sessions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.revoke_sessions ...'
  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'])
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
  header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.revoke_sessions",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#revoke_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_login_flow(flow, submit_self_service_login_flow_body, opts = {}) ⇒ SuccessfulSelfServiceLoginWithoutBrowser

Submit a Login Flow

:::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. :

Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • flow (String)

    The Login Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



5794
5795
5796
5797
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5794

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

#submit_self_service_login_flow_with_http_info(flow, submit_self_service_login_flow_body, opts = {}) ⇒ Array<(SuccessfulSelfServiceLoginWithoutBrowser, Integer, Hash)>

Submit a Login Flow

:::info This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future. :

Use this endpoint to complete a login flow. This endpoint behaves differently for API and browser flows. API flows expect &#x60;application/json&#x60; to be sent in the body and responds with HTTP 200 and a application/json body with the session token on success; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a &#x60;use_flow_id&#x60; parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of &#x60;application/x-www-form-urlencoded&#x60; or &#x60;application/json&#x60; to be sent in the body and respond with a HTTP 303 redirect to the post/after login URL or the &#x60;return_to&#x60; value if it was set and if the login succeeded; a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of &#x60;application/json&#x60; will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with &#x60;Accept: application/json&#x60; in the header, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;security_identity_mismatch&#x60;: The requested &#x60;?return_to&#x60; address is not allowed to be used. Adjust this in the configuration! &#x60;browser_location_change_required&#x60;: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • flow (String)

    The Login Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5807

def (flow, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_login_flow ...'
  end
  # verify the required parameter 'flow' is set
  if @api_client.config.client_side_validation && flow.nil?
    fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_login_flow"
  end
  # verify the required parameter 'submit_self_service_login_flow_body' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'submit_self_service_login_flow_body' when calling V0alpha2Api.submit_self_service_login_flow"
  end
  # resource path
  local_var_path = '/self-service/login'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
  header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_login_flow",
    :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: V0alpha2Api#submit_self_service_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_logout_flow(opts = {}) ⇒ nil

Complete Self-Service Logout This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, …). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](www.ory.sh/docs/next/kratos/self-service/flows/user-logout).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :token (String)

    A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.

  • :return_to (String)

    The URL to return to after the logout was completed.

Returns:

  • (nil)


5873
5874
5875
5876
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5873

def submit_self_service_logout_flow(opts = {})
  submit_self_service_logout_flow_with_http_info(opts)
  nil
end

#submit_self_service_logout_flow_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Complete Self-Service Logout This endpoint logs out an identity in a self-service manner. If the &#x60;Accept&#x60; HTTP header is not set to &#x60;application/json&#x60;, the browser will be redirected (HTTP 303 See Other) to the &#x60;return_to&#x60; parameter of the initial request or fall back to &#x60;urls.default_return_to&#x60;. If the &#x60;Accept&#x60; HTTP header is set to &#x60;application/json&#x60;, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, …). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](www.ory.sh/docs/next/kratos/self-service/flows/user-logout).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :token (String)

    A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.

  • :return_to (String)

    The URL to return to after the logout was completed.

Returns:

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

    nil, response status code and response headers



5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5884

def submit_self_service_logout_flow_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_logout_flow ...'
  end
  # resource path
  local_var_path = '/self-service/logout'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
  query_params[:'return_to'] = opts[:'return_to'] if !opts[:'return_to'].nil?

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_logout_flow",
    :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: V0alpha2Api#submit_self_service_logout_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_logout_flow_without_browser(submit_self_service_logout_flow_without_browser_body, opts = {}) ⇒ nil

Perform Logout for APIs, Services, Apps, … Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.

Parameters:

Returns:

  • (nil)


5935
5936
5937
5938
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5935

def submit_self_service_logout_flow_without_browser(submit_self_service_logout_flow_without_browser_body, opts = {})
  submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body, opts)
  nil
end

#submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Perform Logout for APIs, Services, Apps, … Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when the Ory Session Token has been revoked already before. If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned. This endpoint does not remove any HTTP Cookies - use the Browser-Based Self-Service Logout Flow instead.

Parameters:

Returns:

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

    nil, response status code and response headers



5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
# File 'lib/ory-client/api/v0alpha2_api.rb', line 5945

def submit_self_service_logout_flow_without_browser_with_http_info(submit_self_service_logout_flow_without_browser_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_logout_flow_without_browser ...'
  end
  # verify the required parameter 'submit_self_service_logout_flow_without_browser_body' is set
  if @api_client.config.client_side_validation && submit_self_service_logout_flow_without_browser_body.nil?
    fail ArgumentError, "Missing the required parameter 'submit_self_service_logout_flow_without_browser_body' when calling V0alpha2Api.submit_self_service_logout_flow_without_browser"
  end
  # resource path
  local_var_path = '/self-service/logout/api'

  # 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'])
  # 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(submit_self_service_logout_flow_without_browser_body)

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_logout_flow_without_browser",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#submit_self_service_logout_flow_without_browser\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_recovery_flow(flow, submit_self_service_recovery_flow_body, opts = {}) ⇒ SelfServiceRecoveryFlow

Complete Recovery Flow Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a recovery link") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

  • flow (String)

    The Recovery Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :token (String)

    Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



6006
6007
6008
6009
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6006

def submit_self_service_recovery_flow(flow, submit_self_service_recovery_flow_body, opts = {})
  data, _status_code, _headers = submit_self_service_recovery_flow_with_http_info(flow, submit_self_service_recovery_flow_body, opts)
  data
end

#submit_self_service_recovery_flow_with_http_info(flow, submit_self_service_recovery_flow_body, opts = {}) ⇒ Array<(SelfServiceRecoveryFlow, Integer, Hash)>

Complete Recovery Flow Use this endpoint to complete a recovery flow. This endpoint behaves differently for API and browser flows and has several states: &#x60;choose_method&#x60; expects &#x60;flow&#x60; (in the URL query) and &#x60;email&#x60; (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header &#x60;Accept: application/json&#x60; it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid. and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; for the &#x60;link&#x60; method and allows the user to request another recovery email. It works for both API and Browser-initiated flows and returns the same responses as the flow in &#x60;choose_method&#x60; state. &#x60;passed_challenge&#x60; expects a &#x60;token&#x60; to be sent in the URL query and given the nature of the flow (&quot;sending a recovery link&quot;) does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with a new Recovery Flow ID which contains an error message that the recovery link was invalid. More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).

Parameters:

  • flow (String)

    The Recovery Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/recovery?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :token (String)

    Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceRecoveryFlow data, response status code and response headers



6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6019

def submit_self_service_recovery_flow_with_http_info(flow, submit_self_service_recovery_flow_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_recovery_flow ...'
  end
  # verify the required parameter 'flow' is set
  if @api_client.config.client_side_validation && flow.nil?
    fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_recovery_flow"
  end
  # verify the required parameter 'submit_self_service_recovery_flow_body' is set
  if @api_client.config.client_side_validation && submit_self_service_recovery_flow_body.nil?
    fail ArgumentError, "Missing the required parameter 'submit_self_service_recovery_flow_body' when calling V0alpha2Api.submit_self_service_recovery_flow"
  end
  # resource path
  local_var_path = '/self-service/recovery'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'flow'] = flow
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_recovery_flow",
    :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: V0alpha2Api#submit_self_service_recovery_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_registration_flow(flow, submit_self_service_registration_flow_body, opts = {}) ⇒ SuccessfulSelfServiceRegistrationWithoutBrowser

Submit a Registration Flow Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows. API flows expect `application/json` to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the `session` and `session_token` will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of `application/json` will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_already_available`: The user is already signed in. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • flow (String)

    The Registration Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



6086
6087
6088
6089
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6086

def submit_self_service_registration_flow(flow, submit_self_service_registration_flow_body, opts = {})
  data, _status_code, _headers = submit_self_service_registration_flow_with_http_info(flow, submit_self_service_registration_flow_body, opts)
  data
end

#submit_self_service_registration_flow_with_http_info(flow, submit_self_service_registration_flow_body, opts = {}) ⇒ Array<(SuccessfulSelfServiceRegistrationWithoutBrowser, Integer, Hash)>

Submit a Registration Flow Use this endpoint to complete a registration flow by sending an identity&#39;s traits and password. This endpoint behaves differently for API and browser flows. API flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the &#x60;session&#x60; and &#x60;session_token&#x60; will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a &#x60;use_flow_id&#x60; parameter in the body; HTTP 400 on form validation errors. Browser flows expect a Content-Type of &#x60;application/x-www-form-urlencoded&#x60; or &#x60;application/json&#x60; to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the &#x60;return_to&#x60; value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise. Browser flows with an accept header of &#x60;application/json&#x60; will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. If this endpoint is called with &#x60;Accept: application/json&#x60; in the header, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_already_available&#x60;: The user is already signed in. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;security_identity_mismatch&#x60;: The requested &#x60;?return_to&#x60; address is not allowed to be used. Adjust this in the configuration! &#x60;browser_location_change_required&#x60;: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Login](www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](www.ory.sh/docs/kratos/self-service/flows/user-registration).

Parameters:

  • flow (String)

    The Registration Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6098

def submit_self_service_registration_flow_with_http_info(flow, submit_self_service_registration_flow_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_registration_flow ...'
  end
  # verify the required parameter 'flow' is set
  if @api_client.config.client_side_validation && flow.nil?
    fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_registration_flow"
  end
  # verify the required parameter 'submit_self_service_registration_flow_body' is set
  if @api_client.config.client_side_validation && submit_self_service_registration_flow_body.nil?
    fail ArgumentError, "Missing the required parameter 'submit_self_service_registration_flow_body' when calling V0alpha2Api.submit_self_service_registration_flow"
  end
  # resource path
  local_var_path = '/self-service/registration'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_registration_flow",
    :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: V0alpha2Api#submit_self_service_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_settings_flow(flow, submit_self_service_settings_flow_body, opts = {}) ⇒ SelfServiceSettingsFlow

Complete Settings Flow Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header `Accept` or with `Accept: text/*` respond with a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low. Browser flows with HTTP Header `Accept: application/json` respond with HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the case of an error, the `error.id` of the JSON response body can be one of: `session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`, or initiate a refresh login flow otherwise. `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred. `session_inactive`: No Ory Session was found - sign in a user first. `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other identity logged in instead. `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration! `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

  • flow (String)

    The Settings Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



6165
6166
6167
6168
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6165

def submit_self_service_settings_flow(flow, submit_self_service_settings_flow_body, opts = {})
  data, _status_code, _headers = submit_self_service_settings_flow_with_http_info(flow, submit_self_service_settings_flow_body, opts)
  data
end

#submit_self_service_settings_flow_with_http_info(flow, submit_self_service_settings_flow_body, opts = {}) ⇒ Array<(SelfServiceSettingsFlow, Integer, Hash)>

Complete Settings Flow Use this endpoint to complete a settings flow by sending an identity&#39;s updated password. This endpoint behaves differently for API and browser flows. API-initiated flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached or the session&#39;s AAL is too low. Implies that the user needs to re-authenticate. Browser flows without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; respond with a HTTP 303 redirect to the post/after settings URL or the &#x60;return_to&#x60; value if it was set and if the flow succeeded; a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 303 redirect to the login endpoint when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached or the session&#39;s AAL is too low. Browser flows with HTTP Header &#x60;Accept: application/json&#x60; respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 401 when the endpoint is called without a valid session cookie. HTTP 403 when the page is accessed without a session cookie or the session&#39;s AAL is too low. HTTP 400 on form validation errors. Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration. If this endpoint is called with a &#x60;Accept: application/json&#x60; HTTP header, the response contains the flow without a redirect. In the case of an error, the &#x60;error.id&#x60; of the JSON response body can be one of: &#x60;session_refresh_required&#x60;: The identity requested to change something that needs a privileged session. Redirect the identity to the login init endpoint with query parameters &#x60;?refresh&#x3D;true&amp;return_to&#x3D;&lt;the-current-browser-url&gt;&#x60;, or initiate a refresh login flow otherwise. &#x60;security_csrf_violation&#x60;: Unable to fetch the flow because a CSRF violation occurred. &#x60;session_inactive&#x60;: No Ory Session was found - sign in a user first. &#x60;security_identity_mismatch&#x60;: The flow was interrupted with &#x60;session_refresh_required&#x60; but apparently some other identity logged in instead. &#x60;security_identity_mismatch&#x60;: The requested &#x60;?return_to&#x60; address is not allowed to be used. Adjust this in the configuration! &#x60;browser_location_change_required&#x60;: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows. More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).

Parameters:

  • flow (String)

    The Settings Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    The Session Token of the Identity performing the settings flow.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceSettingsFlow data, response status code and response headers



6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6178

def submit_self_service_settings_flow_with_http_info(flow, submit_self_service_settings_flow_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_settings_flow ...'
  end
  # verify the required parameter 'flow' is set
  if @api_client.config.client_side_validation && flow.nil?
    fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_settings_flow"
  end
  # verify the required parameter 'submit_self_service_settings_flow_body' is set
  if @api_client.config.client_side_validation && submit_self_service_settings_flow_body.nil?
    fail ArgumentError, "Missing the required parameter 'submit_self_service_settings_flow_body' when calling V0alpha2Api.submit_self_service_settings_flow"
  end
  # resource path
  local_var_path = '/self-service/settings'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
  header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_settings_flow",
    :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: V0alpha2Api#submit_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_self_service_verification_flow(flow, submit_self_service_verification_flow_body, opts = {}) ⇒ SelfServiceVerificationFlow

Complete Verification Flow Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state. `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a verification link") does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).

Parameters:

  • flow (String)

    The Verification Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :token (String)

    Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:



6246
6247
6248
6249
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6246

def submit_self_service_verification_flow(flow, submit_self_service_verification_flow_body, opts = {})
  data, _status_code, _headers = submit_self_service_verification_flow_with_http_info(flow, submit_self_service_verification_flow_body, opts)
  data
end

#submit_self_service_verification_flow_with_http_info(flow, submit_self_service_verification_flow_body, opts = {}) ⇒ Array<(SelfServiceVerificationFlow, Integer, Hash)>

Complete Verification Flow Use this endpoint to complete a verification flow. This endpoint behaves differently for API and browser flows and has several states: &#x60;choose_method&#x60; expects &#x60;flow&#x60; (in the URL query) and &#x60;email&#x60; (in the body) to be sent and works with API- and Browser-initiated flows. For API clients and Browser clients with HTTP Header &#x60;Accept: application/json&#x60; it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired). For Browser clients without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended. &#x60;sent_email&#x60; is the success state after &#x60;choose_method&#x60; when using the &#x60;link&#x60; method and allows the user to request another verification email. It works for both API and Browser-initiated flows and returns the same responses as the flow in &#x60;choose_method&#x60; state. &#x60;passed_challenge&#x60; expects a &#x60;token&#x60; to be sent in the URL query and given the nature of the flow (&quot;sending a verification link&quot;) does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with a new Verification Flow ID which contains an error message that the verification link was invalid. More information can be found at [Ory Kratos Email and Phone Verification Documentation](www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).

Parameters:

  • flow (String)

    The Verification Flow ID The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/verification?flow&#x3D;abcde&#x60;).

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

    the optional parameters

Options Hash (opts):

  • :token (String)

    Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call.

  • :cookie (String)

    HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.

Returns:

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

    SelfServiceVerificationFlow data, response status code and response headers



6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6259

def submit_self_service_verification_flow_with_http_info(flow, submit_self_service_verification_flow_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.submit_self_service_verification_flow ...'
  end
  # verify the required parameter 'flow' is set
  if @api_client.config.client_side_validation && flow.nil?
    fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha2Api.submit_self_service_verification_flow"
  end
  # verify the required parameter 'submit_self_service_verification_flow_body' is set
  if @api_client.config.client_side_validation && submit_self_service_verification_flow_body.nil?
    fail ArgumentError, "Missing the required parameter 'submit_self_service_verification_flow_body' when calling V0alpha2Api.submit_self_service_verification_flow"
  end
  # resource path
  local_var_path = '/self-service/verification'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'flow'] = flow
  query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.submit_self_service_verification_flow",
    :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: V0alpha2Api#submit_self_service_verification_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#to_session(opts = {}) ⇒ Session

Check Who the Current HTTP Session Belongs To Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header in the response. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: “`js pseudo-code example router.get('/protected-endpoint', async function (req, res) { const session = await client.toSession(undefined, req.header('cookie')) console.log(session) }) “` When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: “`js pseudo-code example … const session = await client.toSession("the-session-token") console.log(session) “` Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the `X-Session-Token` header! # This endpoint authenticates users by checking if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie; if the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token; if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code. As explained above, this request may fail due to several reasons. The `error.id` can be one of: `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.

  • :cookie (String)

    Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.

Returns:



6325
6326
6327
6328
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6325

def to_session(opts = {})
  data, _status_code, _headers = to_session_with_http_info(opts)
  data
end

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

Check Who the Current HTTP Session Belongs To Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent. Additionally when the request it successful it adds the user ID to the &#39;X-Kratos-Authenticated-Identity-Id&#39; header in the response. If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint: &#x60;&#x60;&#x60;js pseudo-code example router.get(&#39;/protected-endpoint&#39;, async function (req, res) { const session &#x3D; await client.toSession(undefined, req.header(&#39;cookie&#39;)) console.log(session) }) &#x60;&#x60;&#x60; When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token: &#x60;&#x60;&#x60;js pseudo-code example … const session &#x3D; await client.toSession(&quot;the-session-token&quot;) console.log(session) &#x60;&#x60;&#x60; Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user to sign in with the second factor or change the configuration. This endpoint is useful for: AJAX calls. Remember to send credentials and set up CORS correctly! Reverse proxies and API Gateways Server-side calls - use the &#x60;X-Session-Token&#x60; header! # This endpoint authenticates users by checking if the &#x60;Cookie&#x60; HTTP header was set containing an Ory Kratos Session Cookie; if the &#x60;Authorization: bearer &lt;ory-session-token&gt;&#x60; HTTP header was set with a valid Ory Kratos Session Token; if the &#x60;X-Session-Token&#x60; HTTP header was set with a valid Ory Kratos Session Token. If none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code. As explained above, this request may fail due to several reasons. The &#x60;error.id&#x60; can be one of: &#x60;session_inactive&#x60;: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token). &#x60;session_aal2_required&#x60;: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :x_session_token (String)

    Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.

  • :cookie (String)

    Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.

Returns:

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

    Session data, response status code and response headers



6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6336

def to_session_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.to_session ...'
  end
  # resource path
  local_var_path = '/sessions/whoami'

  # 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'])
  header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
  header_params[:'Cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?

  # 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] || []

  new_options = opts.merge(
    :operation => :"V0alpha2Api.to_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: V0alpha2Api#to_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_project(project_id, opts = {}) ⇒ SuccessfulProjectUpdate

Update an Ory Cloud Project Configuration This endpoints allows you to update the Ory Cloud Project configuration for individual services (identity, permission, …). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed. Be aware that updating any service's configuration will completely override your current configuration for that service!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



6388
6389
6390
6391
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6388

def update_project(project_id, opts = {})
  data, _status_code, _headers = update_project_with_http_info(project_id, opts)
  data
end

#update_project_with_http_info(project_id, opts = {}) ⇒ Array<(SuccessfulProjectUpdate, Integer, Hash)>

Update an Ory Cloud Project Configuration This endpoints allows you to update the Ory Cloud Project configuration for individual services (identity, permission, …). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed. Be aware that updating any service&#39;s configuration will completely override your current configuration for that service!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    SuccessfulProjectUpdate data, response status code and response headers



6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
# File 'lib/ory-client/api/v0alpha2_api.rb', line 6399

def update_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: V0alpha2Api.update_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling V0alpha2Api.update_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_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'])
  # 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[:'update_project'])

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

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

  new_options = opts.merge(
    :operation => :"V0alpha2Api.update_project",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: V0alpha2Api#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end