Class: OryClient::IdentityApi
- Inherits:
-
Object
- Object
- OryClient::IdentityApi
- Defined in:
- lib/ory-client/api/identity_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#batch_patch_identities(opts = {}) ⇒ BatchPatchIdentitiesResponse
Create multiple identities Creates multiple [identities](www.ory.com/docs/kratos/concepts/identity-user-model).
-
#batch_patch_identities_with_http_info(opts = {}) ⇒ Array<(BatchPatchIdentitiesResponse, Integer, Hash)>
Create multiple identities Creates multiple [identities](www.ory.com/docs/kratos/concepts/identity-user-model).
-
#create_identity(opts = {}) ⇒ Identity
Create an Identity Create an [identity](www.ory.com/docs/kratos/concepts/identity-user-model).
-
#create_identity_with_http_info(opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Create an Identity Create an [identity](www.ory.com/docs/kratos/concepts/identity-user-model).
-
#create_recovery_code_for_identity(opts = {}) ⇒ RecoveryCodeForIdentity
Create a Recovery Code This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
-
#create_recovery_code_for_identity_with_http_info(opts = {}) ⇒ Array<(RecoveryCodeForIdentity, Integer, Hash)>
Create a Recovery Code This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
-
#create_recovery_link_for_identity(opts = {}) ⇒ RecoveryLinkForIdentity
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.
-
#create_recovery_link_for_identity_with_http_info(opts = {}) ⇒ Array<(RecoveryLinkForIdentity, Integer, Hash)>
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.
-
#create_test_login_flow(create_test_login_flow_body, opts = {}) ⇒ LoginFlow
Create a test OIDC login flow Creates a dry-run OIDC test login flow pre-scoped to one provider.
-
#create_test_login_flow_with_http_info(create_test_login_flow_body, opts = {}) ⇒ Array<(LoginFlow, Integer, Hash)>
Create a test OIDC login flow Creates a dry-run OIDC test login flow pre-scoped to one provider.
-
#delete_identity(id, opts = {}) ⇒ nil
Delete an Identity Calling this endpoint irrecoverably and permanently deletes the [identity](www.ory.com/docs/kratos/concepts/identity-user-model) given its ID.
-
#delete_identity_credentials(id, type, opts = {}) ⇒ nil
Delete a credential for a specific identity Delete an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type.
-
#delete_identity_credentials_with_http_info(id, type, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a credential for a specific identity Delete an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type.
-
#delete_identity_sessions(id, opts = {}) ⇒ nil
Delete & Invalidate an Identity’s Sessions Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
-
#delete_identity_sessions_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete & Invalidate an Identity's Sessions Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
-
#delete_identity_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an Identity Calling this endpoint irrecoverably and permanently deletes the [identity](www.ory.com/docs/kratos/concepts/identity-user-model) given its ID.
-
#disable_session(id, opts = {}) ⇒ nil
Deactivate a Session Calling this endpoint deactivates the specified session.
-
#disable_session_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deactivate a Session Calling this endpoint deactivates the specified session.
-
#extend_session(id, opts = {}) ⇒ Session
Extend a Session Calling this endpoint extends the given session ID.
-
#extend_session_with_http_info(id, opts = {}) ⇒ Array<(Session, Integer, Hash)>
Extend a Session Calling this endpoint extends the given session ID.
-
#get_identity(id, opts = {}) ⇒ Identity
Get an Identity Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its ID.
-
#get_identity_by_external_id(external_id, opts = {}) ⇒ Identity
Get an Identity by its External ID Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID.
-
#get_identity_by_external_id_with_http_info(external_id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Get an Identity by its External ID Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID.
-
#get_identity_schema(id, opts = {}) ⇒ Object
Get Identity JSON Schema Return a specific identity schema.
-
#get_identity_schema_with_http_info(id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Get Identity JSON Schema Return a specific identity schema.
-
#get_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Get an Identity Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its ID.
-
#get_session(id, opts = {}) ⇒ Session
Get Session This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
-
#get_session_with_http_info(id, opts = {}) ⇒ Array<(Session, Integer, Hash)>
Get Session This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
-
#initialize(api_client = ApiClient.default) ⇒ IdentityApi
constructor
A new instance of IdentityApi.
-
#list_identities(opts = {}) ⇒ Array<Identity>
List Identities Lists all [identities](www.ory.com/docs/kratos/concepts/identity-user-model) in the system.
-
#list_identities_with_http_info(opts = {}) ⇒ Array<(Array<Identity>, Integer, Hash)>
List Identities Lists all [identities](www.ory.com/docs/kratos/concepts/identity-user-model) in the system.
-
#list_identity_schemas(opts = {}) ⇒ Array<IdentitySchemaContainer>
Get all Identity Schemas Returns a list of all identity schemas currently in use.
-
#list_identity_schemas_with_http_info(opts = {}) ⇒ Array<(Array<IdentitySchemaContainer>, Integer, Hash)>
Get all Identity Schemas Returns a list of all identity schemas currently in use.
-
#list_identity_sessions(id, opts = {}) ⇒ Array<Session>
List an Identity’s Sessions This endpoint returns all sessions that belong to the given Identity.
-
#list_identity_sessions_with_http_info(id, opts = {}) ⇒ Array<(Array<Session>, Integer, Hash)>
List an Identity's Sessions This endpoint returns all sessions that belong to the given Identity.
-
#list_sessions(opts = {}) ⇒ Array<Session>
List All Sessions Listing all sessions that exist.
-
#list_sessions_with_http_info(opts = {}) ⇒ Array<(Array<Session>, Integer, Hash)>
List All Sessions Listing all sessions that exist.
-
#manage_sessions(manage_sessions_body, opts = {}) ⇒ ManageSessionsResponse
Manage sessions in bulk Disable or delete sessions for a list of identities or a list of sessions in a single call.
-
#manage_sessions_with_http_info(manage_sessions_body, opts = {}) ⇒ Array<(ManageSessionsResponse, Integer, Hash)>
Manage sessions in bulk Disable or delete sessions for a list of identities or a list of sessions in a single call.
-
#patch_identity(id, opts = {}) ⇒ Identity
Patch an Identity Partially updates an [identity’s](www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](jsonpatch.com/).
-
#patch_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Patch an Identity Partially updates an [identity's](www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](jsonpatch.com/).
-
#update_identity(id, opts = {}) ⇒ Identity
Update an Identity This endpoint updates an [identity](www.ory.com/docs/kratos/concepts/identity-user-model).
-
#update_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Update an Identity This endpoint updates an [identity](www.ory.com/docs/kratos/concepts/identity-user-model).
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ IdentityApi
Returns a new instance of IdentityApi.
19 20 21 |
# File 'lib/ory-client/api/identity_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ory-client/api/identity_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#batch_patch_identities(opts = {}) ⇒ BatchPatchIdentitiesResponse
Create multiple identities Creates multiple [identities](www.ory.com/docs/kratos/concepts/identity-user-model). You can also use this endpoint to [import credentials](www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods. If the patch includes hashed passwords you can import up to 1,000 identities per request. If the patch includes at least one plaintext password you can import up to 200 identities per request. Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored. If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected. If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt If the issue persists, contact support.
27 28 29 30 |
# File 'lib/ory-client/api/identity_api.rb', line 27 def batch_patch_identities(opts = {}) data, _status_code, _headers = batch_patch_identities_with_http_info(opts) data end |
#batch_patch_identities_with_http_info(opts = {}) ⇒ Array<(BatchPatchIdentitiesResponse, Integer, Hash)>
Create multiple identities Creates multiple [identities](www.ory.com/docs/kratos/concepts/identity-user-model). You can also use this endpoint to [import credentials](www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods. If the patch includes hashed passwords you can import up to 1,000 identities per request. If the patch includes at least one plaintext password you can import up to 200 identities per request. Avoid importing large batches with plaintext passwords. They can cause timeouts as the passwords need to be hashed before they are stored. If at least one identity is imported successfully, the response status is 200 OK. If all imports fail, the response is one of the following 4xx errors: 400 Bad Request: The request payload is invalid or improperly formatted. 409 Conflict: Duplicate identities or conflicting data were detected. If you get a 504 Gateway Timeout: Reduce the batch size Avoid duplicate identities Pre-hash passwords with BCrypt If the issue persists, contact support.
37 38 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 |
# File 'lib/ory-client/api/identity_api.rb', line 37 def batch_patch_identities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.batch_patch_identities ...' 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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_identities_body']) # return_type return_type = opts[:debug_return_type] || 'BatchPatchIdentitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.batch_patch_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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#batch_patch_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_identity(opts = {}) ⇒ Identity
Create an Identity Create an [identity](www.ory.com/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations, or multifactor methods.
91 92 93 94 |
# File 'lib/ory-client/api/identity_api.rb', line 91 def create_identity(opts = {}) data, _status_code, _headers = create_identity_with_http_info(opts) data end |
#create_identity_with_http_info(opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Create an Identity Create an [identity](www.ory.com/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](www.ory.com/docs/kratos/manage-identities/import-user-accounts-identities) for instance passwords, social sign in configurations, or multifactor methods.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/ory-client/api/identity_api.rb', line 101 def create_identity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_identity_body']) # return_type return_type = opts[:debug_return_type] || 'Identity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#create_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_recovery_code_for_identity(opts = {}) ⇒ RecoveryCodeForIdentity
Create a Recovery Code This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
155 156 157 158 |
# File 'lib/ory-client/api/identity_api.rb', line 155 def create_recovery_code_for_identity(opts = {}) data, _status_code, _headers = create_recovery_code_for_identity_with_http_info(opts) data end |
#create_recovery_code_for_identity_with_http_info(opts = {}) ⇒ Array<(RecoveryCodeForIdentity, Integer, Hash)>
Create a Recovery Code This endpoint creates a recovery code which should be given to the user in order for them to recover (or activate) their account.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 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 |
# File 'lib/ory-client/api/identity_api.rb', line 165 def create_recovery_code_for_identity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.create_recovery_code_for_identity ...' 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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_recovery_code_for_identity_body']) # return_type return_type = opts[:debug_return_type] || 'RecoveryCodeForIdentity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.create_recovery_code_for_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#create_recovery_code_for_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_recovery_link_for_identity(opts = {}) ⇒ RecoveryLinkForIdentity
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.
220 221 222 223 |
# File 'lib/ory-client/api/identity_api.rb', line 220 def create_recovery_link_for_identity(opts = {}) data, _status_code, _headers = create_recovery_link_for_identity_with_http_info(opts) data end |
#create_recovery_link_for_identity_with_http_info(opts = {}) ⇒ Array<(RecoveryLinkForIdentity, Integer, Hash)>
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.
231 232 233 234 235 236 237 238 239 240 241 242 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 |
# File 'lib/ory-client/api/identity_api.rb', line 231 def create_recovery_link_for_identity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.create_recovery_link_for_identity ...' end # resource path local_var_path = '/admin/recovery/link' # 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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_recovery_link_for_identity_body']) # return_type return_type = opts[:debug_return_type] || 'RecoveryLinkForIdentity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.create_recovery_link_for_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#create_recovery_link_for_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_test_login_flow(create_test_login_flow_body, opts = {}) ⇒ LoginFlow
Create a test OIDC login flow Creates a dry-run OIDC test login flow pre-scoped to one provider. The returned flow carries a single-submit UI and a CSRF bearer token. No identity is persisted and no session is issued when the flow completes; the captured debug data is returned in the flow’s test_context.
286 287 288 289 |
# File 'lib/ory-client/api/identity_api.rb', line 286 def create_test_login_flow(create_test_login_flow_body, opts = {}) data, _status_code, _headers = create_test_login_flow_with_http_info(create_test_login_flow_body, opts) data end |
#create_test_login_flow_with_http_info(create_test_login_flow_body, opts = {}) ⇒ Array<(LoginFlow, Integer, Hash)>
Create a test OIDC login flow Creates a dry-run OIDC test login flow pre-scoped to one provider. The returned flow carries a single-submit UI and a CSRF bearer token. No identity is persisted and no session is issued when the flow completes; the captured debug data is returned in the flow's test_context.
296 297 298 299 300 301 302 303 304 305 306 307 308 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 |
# File 'lib/ory-client/api/identity_api.rb', line 296 def create_test_login_flow_with_http_info(create_test_login_flow_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.create_test_login_flow ...' end # verify the required parameter 'create_test_login_flow_body' is set if @api_client.config.client_side_validation && create_test_login_flow_body.nil? fail ArgumentError, "Missing the required parameter 'create_test_login_flow_body' when calling IdentityApi.create_test_login_flow" end # resource path local_var_path = '/admin/test-login-flows' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_test_login_flow_body) # return_type return_type = opts[:debug_return_type] || 'LoginFlow' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.create_test_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#create_test_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_identity(id, opts = {}) ⇒ nil
Delete an Identity Calling this endpoint irrecoverably and permanently deletes the [identity](www.ory.com/docs/kratos/concepts/identity-user-model) given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
354 355 356 357 |
# File 'lib/ory-client/api/identity_api.rb', line 354 def delete_identity(id, opts = {}) delete_identity_with_http_info(id, opts) nil end |
#delete_identity_credentials(id, type, opts = {}) ⇒ nil
Delete a credential for a specific identity Delete an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
419 420 421 422 |
# File 'lib/ory-client/api/identity_api.rb', line 419 def delete_identity_credentials(id, type, opts = {}) delete_identity_credentials_with_http_info(id, type, opts) nil end |
#delete_identity_credentials_with_http_info(id, type, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a credential for a specific identity Delete an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 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 |
# File 'lib/ory-client/api/identity_api.rb', line 431 def delete_identity_credentials_with_http_info(id, type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.delete_identity_credentials ...' 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 IdentityApi.delete_identity_credentials" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling IdentityApi.delete_identity_credentials" end # verify enum value allowable_values = ["password", "oidc", "totp", "lookup_secret", "webauthn", "code", "passkey", "profile", "saml", "deviceauthn", "identifier_first", "link_recovery", "code_recovery"] if @api_client.config.client_side_validation && !allowable_values.include?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end # resource path local_var_path = '/admin/identities/{id}/credentials/{type}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'type' + '}', CGI.escape(type.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.delete_identity_credentials", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#delete_identity_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_identity_sessions(id, opts = {}) ⇒ nil
Delete & Invalidate an Identity’s Sessions Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
494 495 496 497 |
# File 'lib/ory-client/api/identity_api.rb', line 494 def delete_identity_sessions(id, opts = {}) delete_identity_sessions_with_http_info(id, opts) nil end |
#delete_identity_sessions_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete & Invalidate an Identity's Sessions Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/ory-client/api/identity_api.rb', line 504 def delete_identity_sessions_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#delete_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_identity_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an Identity Calling this endpoint irrecoverably and permanently deletes the [identity](www.ory.com/docs/kratos/concepts/identity-user-model) given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or 404 if the identity was not found.
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/ory-client/api/identity_api.rb', line 364 def delete_identity_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#delete_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#disable_session(id, opts = {}) ⇒ nil
Deactivate a Session Calling this endpoint deactivates the specified session. Session data is not deleted.
557 558 559 560 |
# File 'lib/ory-client/api/identity_api.rb', line 557 def disable_session(id, opts = {}) disable_session_with_http_info(id, opts) nil end |
#disable_session_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deactivate a Session Calling this endpoint deactivates the specified session. Session data is not deleted.
567 568 569 570 571 572 573 574 575 576 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 |
# File 'lib/ory-client/api/identity_api.rb', line 567 def disable_session_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.disable_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 IdentityApi.disable_session" end # resource path local_var_path = '/admin/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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.disable_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#disable_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#extend_session(id, opts = {}) ⇒ Session
Extend a 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. This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon. This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
620 621 622 623 |
# File 'lib/ory-client/api/identity_api.rb', line 620 def extend_session(id, opts = {}) data, _status_code, _headers = extend_session_with_http_info(id, opts) data end |
#extend_session_with_http_info(id, opts = {}) ⇒ Array<(Session, Integer, Hash)>
Extend a 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. This endpoint returns per default a 204 No Content response on success. Older Ory Network projects may return a 200 OK response with the session in the body. Returning the session as part of the response will be deprecated in the future and should not be relied upon. This endpoint ignores consecutive requests to extend the same session and returns a 404 error in those scenarios. This endpoint also returns 404 errors if the session does not exist. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
630 631 632 633 634 635 636 637 638 639 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 |
# File 'lib/ory-client/api/identity_api.rb', line 630 def extend_session_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Session' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#extend_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_identity(id, opts = {}) ⇒ Identity
Get an Identity Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the ‘include_credential` query parameter.
684 685 686 687 |
# File 'lib/ory-client/api/identity_api.rb', line 684 def get_identity(id, opts = {}) data, _status_code, _headers = get_identity_with_http_info(id, opts) data end |
#get_identity_by_external_id(external_id, opts = {}) ⇒ Identity
Get an Identity by its External ID Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the ‘include_credential` query parameter.
754 755 756 757 |
# File 'lib/ory-client/api/identity_api.rb', line 754 def get_identity_by_external_id(external_id, opts = {}) data, _status_code, _headers = get_identity_by_external_id_with_http_info(external_id, opts) data end |
#get_identity_by_external_id_with_http_info(external_id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Get an Identity by its External ID Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its external ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
765 766 767 768 769 770 771 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 |
# File 'lib/ory-client/api/identity_api.rb', line 765 def get_identity_by_external_id_with_http_info(external_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.get_identity_by_external_id ...' end # verify the required parameter 'external_id' is set if @api_client.config.client_side_validation && external_id.nil? fail ArgumentError, "Missing the required parameter 'external_id' when calling IdentityApi.get_identity_by_external_id" end allowable_values = ["password", "oidc", "totp", "lookup_secret", "webauthn", "code", "passkey", "profile", "saml", "deviceauthn", "identifier_first", "link_recovery", "code_recovery"] if @api_client.config.client_side_validation && opts[:'include_credential'] && !opts[:'include_credential'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include_credential\", must include one of #{allowable_values}" end # resource path local_var_path = '/admin/identities/by/external/{externalID}'.sub('{' + 'externalID' + '}', CGI.escape(external_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Identity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.get_identity_by_external_id", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#get_identity_by_external_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_identity_schema(id, opts = {}) ⇒ Object
Get Identity JSON Schema Return a specific identity schema.
823 824 825 826 |
# File 'lib/ory-client/api/identity_api.rb', line 823 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 Identity JSON Schema Return a specific identity schema.
833 834 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 |
# File 'lib/ory-client/api/identity_api.rb', line 833 def get_identity_schema_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#get_identity_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Get an Identity Return an [identity](www.ory.com/docs/kratos/concepts/identity-user-model) by its ID. You can optionally include credentials (e.g. social sign in connections) in the response by using the `include_credential` query parameter.
695 696 697 698 699 700 701 702 703 704 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 |
# File 'lib/ory-client/api/identity_api.rb', line 695 def get_identity_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.get_identity" end allowable_values = ["password", "oidc", "totp", "lookup_secret", "webauthn", "code", "passkey", "profile", "saml", "deviceauthn", "identifier_first", "link_recovery", "code_recovery"] if @api_client.config.client_side_validation && opts[:'include_credential'] && !opts[:'include_credential'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"include_credential\", must include one of #{allowable_values}" 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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Identity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_session(id, opts = {}) ⇒ Session
Get Session This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
887 888 889 890 |
# File 'lib/ory-client/api/identity_api.rb', line 887 def get_session(id, opts = {}) data, _status_code, _headers = get_session_with_http_info(id, opts) data end |
#get_session_with_http_info(id, opts = {}) ⇒ Array<(Session, Integer, Hash)>
Get Session This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
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 946 947 948 949 |
# File 'lib/ory-client/api/identity_api.rb', line 898 def get_session_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.get_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 IdentityApi.get_session" end allowable_values = ["identity", "devices"] if @api_client.config.client_side_validation && opts[:'expand'] && !opts[:'expand'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"expand\", must include one of #{allowable_values}" end # resource path local_var_path = '/admin/sessions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Session' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.get_session", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_identities(opts = {}) ⇒ Array<Identity>
List Identities Lists all [identities](www.ory.com/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
965 966 967 968 |
# File 'lib/ory-client/api/identity_api.rb', line 965 def list_identities(opts = {}) data, _status_code, _headers = list_identities_with_http_info(opts) data end |
#list_identities_with_http_info(opts = {}) ⇒ Array<(Array<Identity>, Integer, Hash)>
List Identities Lists all [identities](www.ory.com/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
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 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 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 |
# File 'lib/ory-client/api/identity_api.rb', line 984 def list_identities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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 IdentityApi.list_identities, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IdentityApi.list_identities, must be smaller than or equal to 500.' 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 IdentityApi.list_identities, must be greater than or equal to 1.' end allowable_values = ["", "strong", "eventual"] if @api_client.config.client_side_validation && opts[:'consistency'] && !allowable_values.include?(opts[:'consistency']) fail ArgumentError, "invalid value for \"consistency\", must be one of #{allowable_values}" 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? 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[:'consistency'] = opts[:'consistency'] if !opts[:'consistency'].nil? query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil? query_params[:'credentials_identifier'] = opts[:'credentials_identifier'] if !opts[:'credentials_identifier'].nil? query_params[:'preview_credentials_identifier_similar'] = opts[:'preview_credentials_identifier_similar'] if !opts[:'preview_credentials_identifier_similar'].nil? query_params[:'include_credential'] = @api_client.build_collection_param(opts[:'include_credential'], :multi) if !opts[:'include_credential'].nil? query_params[:'organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Identity>' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#list_identities\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 Returns a list of all identity schemas currently in use.
1066 1067 1068 1069 |
# File 'lib/ory-client/api/identity_api.rb', line 1066 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 Returns a list of all identity schemas currently in use.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 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 1138 1139 1140 1141 |
# File 'lib/ory-client/api/identity_api.rb', line 1079 def list_identity_schemas_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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 IdentityApi.list_identity_schemas, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IdentityApi.list_identity_schemas, must be smaller than or equal to 500.' 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 IdentityApi.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? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<IdentitySchemaContainer>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#list_identity_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_identity_sessions(id, opts = {}) ⇒ Array<Session>
List an Identity’s Sessions This endpoint returns all sessions that belong to the given Identity.
1153 1154 1155 1156 |
# File 'lib/ory-client/api/identity_api.rb', line 1153 def list_identity_sessions(id, opts = {}) data, _status_code, _headers = list_identity_sessions_with_http_info(id, opts) data end |
#list_identity_sessions_with_http_info(id, opts = {}) ⇒ Array<(Array<Session>, Integer, Hash)>
List an Identity's Sessions This endpoint returns all sessions that belong to the given Identity.
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 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/ory-client/api/identity_api.rb', line 1168 def list_identity_sessions_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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 IdentityApi.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 IdentityApi.list_identity_sessions, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IdentityApi.list_identity_sessions, must be smaller than or equal to 500.' 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 IdentityApi.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[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Session>' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#list_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_sessions(opts = {}) ⇒ Array<Session>
List All Sessions Listing all sessions that exist.
1245 1246 1247 1248 |
# File 'lib/ory-client/api/identity_api.rb', line 1245 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)>
List All Sessions Listing all sessions that exist.
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 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 |
# File 'lib/ory-client/api/identity_api.rb', line 1258 def list_sessions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.list_sessions ...' 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 IdentityApi.list_sessions, 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 IdentityApi.list_sessions, must be greater than or equal to 1.' end allowable_values = ["identity", "devices"] if @api_client.config.client_side_validation && opts[:'expand'] && !opts[:'expand'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"expand\", must include one of #{allowable_values}" end # resource path local_var_path = '/admin/sessions' # 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[:'active'] = opts[:'active'] if !opts[:'active'].nil? query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if !opts[:'expand'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Session>' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#manage_sessions(manage_sessions_body, opts = {}) ⇒ ManageSessionsResponse
Manage sessions in bulk Disable or delete sessions for a list of identities or a list of sessions in a single call. The ‘action` field selects the operation: `disable` — deactivate matching sessions (sets `active = false`, preserves audit data). `delete` — permanently delete matching sessions. Exactly one of `identities` or `sessions` must be provided. To scope the operation to every session in the network, pass `identities: ["*"]`; the wildcard is not accepted in the `sessions` field. Up to 500 explicit IDs are accepted per call. All requests return `200 OK` with `more`. `processed` reports how many rows the call affected; for `disable` it counts only sessions that were active before the call. `more` is `true` only when a wildcard request reached the per-call batch limit and additional rows may remain; callers drain the network by re-issuing the same request while `more` is `true`. Explicit-IDs requests always return `more: false`.
1323 1324 1325 1326 |
# File 'lib/ory-client/api/identity_api.rb', line 1323 def manage_sessions(manage_sessions_body, opts = {}) data, _status_code, _headers = manage_sessions_with_http_info(manage_sessions_body, opts) data end |
#manage_sessions_with_http_info(manage_sessions_body, opts = {}) ⇒ Array<(ManageSessionsResponse, Integer, Hash)>
Manage sessions in bulk Disable or delete sessions for a list of identities or a list of sessions in a single call. The `action` field selects the operation: `disable` — deactivate matching sessions (sets `active = false`, preserves audit data). `delete` — permanently delete matching sessions. Exactly one of `identities` or `sessions` must be provided. To scope the operation to every session in the network, pass `identities: ["*"]`; the wildcard is not accepted in the `sessions` field. Up to 500 explicit IDs are accepted per call. All requests return `200 OK` with `more`. `processed` reports how many rows the call affected; for `disable` it counts only sessions that were active before the call. `more` is `true` only when a wildcard request reached the per-call batch limit and additional rows may remain; callers drain the network by re-issuing the same request while `more` is `true`. Explicit-IDs requests always return `more: false`.
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 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 |
# File 'lib/ory-client/api/identity_api.rb', line 1333 def manage_sessions_with_http_info(manage_sessions_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.manage_sessions ...' end # verify the required parameter 'manage_sessions_body' is set if @api_client.config.client_side_validation && manage_sessions_body.nil? fail ArgumentError, "Missing the required parameter 'manage_sessions_body' when calling IdentityApi.manage_sessions" end # resource path local_var_path = '/admin/sessions' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(manage_sessions_body) # return_type return_type = opts[:debug_return_type] || 'ManageSessionsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.manage_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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#manage_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_identity(id, opts = {}) ⇒ Identity
Patch an Identity Partially updates an [identity’s](www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](jsonpatch.com/). The fields ‘id`, `stateChangedAt` and `credentials` can not be updated using this method.
1392 1393 1394 1395 |
# File 'lib/ory-client/api/identity_api.rb', line 1392 def patch_identity(id, opts = {}) data, _status_code, _headers = patch_identity_with_http_info(id, opts) data end |
#patch_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Patch an Identity Partially updates an [identity's](www.ory.com/docs/kratos/concepts/identity-user-model) field using [JSON Patch](jsonpatch.com/). The fields `id`, `stateChangedAt` and `credentials` can not be updated using this method.
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 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 |
# File 'lib/ory-client/api/identity_api.rb', line 1403 def patch_identity_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_patch']) # return_type return_type = opts[:debug_return_type] || 'Identity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#patch_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_identity(id, opts = {}) ⇒ Identity
Update an Identity This endpoint updates an [identity](www.ory.com/docs/kratos/concepts/identity-user-model). The full identity payload (except credentials) is expected. It is possible to update the identity’s credentials as well. Using this operation, credentials will not be overwritten but instead added to the list. For example, if a user has a social sign in connection set up, updating the credentials will keep the social sign in connection and add the new credentials to the list. This prevents accidentally overwriting credentials and locking out users. A complete view of all credential types is here: ‘password`: The existing password credential will be completely replaced with the new configuration. You can provide either a hashed password, a plaintext password (which will be hashed), or enable the password migration hook. `oidc`, `saml`: The existing OIDC and SAML credentials will be kept and the new credentials will be added to the list. `totp`: The existing TOTP credentials will be replaced with the new configuration. `lookup_secret`: The existing Lookup Secret codes will be kept and the new codes will be added to the list. `webauthn`, `passkey`: The existing credentials are preserved, new credentials are added, and credentials with matching IDs are updated with new values. If a new `user_handle` is provided, it’s added to the identity’s identifiers list while preserving previous user handles. ‘code`: To import code credentials, configure your identity schema to use one of the identity traits as an identifier source (`"via":"email"}}`).
1462 1463 1464 1465 |
# File 'lib/ory-client/api/identity_api.rb', line 1462 def update_identity(id, opts = {}) data, _status_code, _headers = update_identity_with_http_info(id, opts) data end |
#update_identity_with_http_info(id, opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Update an Identity This endpoint updates an [identity](www.ory.com/docs/kratos/concepts/identity-user-model). The full identity payload (except credentials) is expected. It is possible to update the identity's credentials as well. Using this operation, credentials will not be overwritten but instead added to the list. For example, if a user has a social sign in connection set up, updating the credentials will keep the social sign in connection and add the new credentials to the list. This prevents accidentally overwriting credentials and locking out users. A complete view of all credential types is here: `password`: The existing password credential will be completely replaced with the new configuration. You can provide either a hashed password, a plaintext password (which will be hashed), or enable the password migration hook. `oidc`, `saml`: The existing OIDC and SAML credentials will be kept and the new credentials will be added to the list. `totp`: The existing TOTP credentials will be replaced with the new configuration. `lookup_secret`: The existing Lookup Secret codes will be kept and the new codes will be added to the list. `webauthn`, `passkey`: The existing credentials are preserved, new credentials are added, and credentials with matching IDs are updated with new values. If a new `user_handle` is provided, it's added to the identity's identifiers list while preserving previous user handles. `code`: To import code credentials, configure your identity schema to use one of the identity traits as an identifier source (`"via":"email"}}`).
1473 1474 1475 1476 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/identity_api.rb', line 1473 def update_identity_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IdentityApi.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 IdentityApi.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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_identity_body']) # return_type return_type = opts[:debug_return_type] || 'Identity' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = opts.merge( :operation => :"IdentityApi.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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: IdentityApi#update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |