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.sh/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.sh/docs/kratos/concepts/identity-user-model).
-
#create_identity(opts = {}) ⇒ Identity
Create an Identity Create an [identity](www.ory.sh/docs/kratos/concepts/identity-user-model).
-
#create_identity_with_http_info(opts = {}) ⇒ Array<(Identity, Integer, Hash)>
Create an Identity Create an [identity](www.ory.sh/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.
-
#delete_identity(id, opts = {}) ⇒ nil
Delete an Identity Calling this endpoint irrecoverably and permanently deletes the [identity](www.ory.sh/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.sh/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.sh/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.sh/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.sh/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.sh/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.sh/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.sh/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.sh/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.sh/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.
-
#patch_identity(id, opts = {}) ⇒ Identity
Patch an Identity Partially updates an [identity’s](www.ory.sh/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.sh/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.sh/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.sh/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.sh/docs/kratos/concepts/identity-user-model). You can also use this endpoint to [import credentials](www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods. You can import: Up to 1,000 identities per request Up to 200 identities per request if including plaintext passwords 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.sh/docs/kratos/concepts/identity-user-model). You can also use this endpoint to [import credentials](www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities), including passwords, social sign-in settings, and multi-factor authentication methods. You can import: Up to 1,000 identities per request Up to 200 identities per request if including plaintext passwords 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.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](www.ory.sh/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.sh/docs/kratos/concepts/identity-user-model). This endpoint can also be used to [import credentials](www.ory.sh/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 |
#delete_identity(id, opts = {}) ⇒ nil
Delete an Identity Calling this endpoint irrecoverably and permanently deletes the [identity](www.ory.sh/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.
286 287 288 289 |
# File 'lib/ory-client/api/identity_api.rb', line 286 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.sh/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
351 352 353 354 |
# File 'lib/ory-client/api/identity_api.rb', line 351 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.sh/docs/kratos/concepts/identity-user-model) credential by its type. You cannot delete passkeys or code auth credentials through this API.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 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 |
# File 'lib/ory-client/api/identity_api.rb', line 363 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", "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.
426 427 428 429 |
# File 'lib/ory-client/api/identity_api.rb', line 426 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.
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 |
# File 'lib/ory-client/api/identity_api.rb', line 436 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.sh/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.
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 |
# File 'lib/ory-client/api/identity_api.rb', line 296 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.
489 490 491 492 |
# File 'lib/ory-client/api/identity_api.rb', line 489 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.
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/ory-client/api/identity_api.rb', line 499 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.
552 553 554 555 |
# File 'lib/ory-client/api/identity_api.rb', line 552 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.
562 563 564 565 566 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 |
# File 'lib/ory-client/api/identity_api.rb', line 562 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.sh/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.
616 617 618 619 |
# File 'lib/ory-client/api/identity_api.rb', line 616 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.sh/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.
686 687 688 689 |
# File 'lib/ory-client/api/identity_api.rb', line 686 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.sh/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.
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 747 748 |
# File 'lib/ory-client/api/identity_api.rb', line 697 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", "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.
755 756 757 758 |
# File 'lib/ory-client/api/identity_api.rb', line 755 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.
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 |
# File 'lib/ory-client/api/identity_api.rb', line 765 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.sh/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.
627 628 629 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 677 678 |
# File 'lib/ory-client/api/identity_api.rb', line 627 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", "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.
819 820 821 822 |
# File 'lib/ory-client/api/identity_api.rb', line 819 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.
830 831 832 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 880 881 |
# File 'lib/ory-client/api/identity_api.rb', line 830 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.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
897 898 899 900 |
# File 'lib/ory-client/api/identity_api.rb', line 897 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.sh/docs/kratos/concepts/identity-user-model) in the system. Note: filters cannot be combined.
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 950 951 952 953 954 955 956 957 958 959 960 961 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 |
# File 'lib/ory-client/api/identity_api.rb', line 916 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.
998 999 1000 1001 |
# File 'lib/ory-client/api/identity_api.rb', line 998 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.
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 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 |
# File 'lib/ory-client/api/identity_api.rb', line 1011 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.
1085 1086 1087 1088 |
# File 'lib/ory-client/api/identity_api.rb', line 1085 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.
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 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 |
# File 'lib/ory-client/api/identity_api.rb', line 1100 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.
1177 1178 1179 1180 |
# File 'lib/ory-client/api/identity_api.rb', line 1177 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.
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 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 |
# File 'lib/ory-client/api/identity_api.rb', line 1190 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 |
#patch_identity(id, opts = {}) ⇒ Identity
Patch an Identity Partially updates an [identity’s](www.ory.sh/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.
1256 1257 1258 1259 |
# File 'lib/ory-client/api/identity_api.rb', line 1256 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.sh/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.
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 1317 1318 |
# File 'lib/ory-client/api/identity_api.rb', line 1267 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.sh/docs/kratos/concepts/identity-user-model). The full identity payload, except credentials, is expected. For partial updates, use the [patchIdentity](www.ory.sh/docs/reference/api#tag/identity/operation/patchIdentity) operation. A credential can be provided via the ‘credentials` field in the request body. If provided, the credentials will be imported and added to the existing credentials of the identity.
1326 1327 1328 1329 |
# File 'lib/ory-client/api/identity_api.rb', line 1326 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.sh/docs/kratos/concepts/identity-user-model). The full identity payload, except credentials, is expected. For partial updates, use the [patchIdentity](www.ory.sh/docs/reference/api#tag/identity/operation/patchIdentity) operation. A credential can be provided via the `credentials` field in the request body. If provided, the credentials will be imported and added to the existing credentials of the identity.
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 1385 1386 1387 1388 |
# File 'lib/ory-client/api/identity_api.rb', line 1337 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 |