Class: OryKratosClient::IdentityApi
- Inherits:
-
Object
- Object
- OryKratosClient::IdentityApi
- Defined in:
- lib/ory-kratos-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 and deletes multiple identities Creates or delete multiple [identities](www.ory.sh/docs/kratos/concepts/identity-user-model).
-
#batch_patch_identities_with_http_info(opts = {}) ⇒ Array<(BatchPatchIdentitiesResponse, Integer, Hash)>
Create and deletes multiple identities Creates or delete 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 You can only delete second factor (aal2) credentials.
-
#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 can only delete second factor (aal2) credentials.
-
#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_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-kratos-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-kratos-client/api/identity_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#batch_patch_identities(opts = {}) ⇒ BatchPatchIdentitiesResponse
Create and deletes multiple identities Creates or delete multiple [identities](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.
27 28 29 30 |
# File 'lib/ory-kratos-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 and deletes multiple identities Creates or delete multiple [identities](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.
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-kratos-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']) # 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-kratos-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-kratos-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']) # 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-kratos-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-kratos-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']) # 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.
219 220 221 222 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 219 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.
229 230 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 229 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] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_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 when the identity was not found, in which case it is assumed that is has been deleted already.
283 284 285 286 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 283 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 can only delete second factor (aal2) credentials.
347 348 349 350 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 347 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 can only delete second factor (aal2) credentials.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 358 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 = ["totp", "webauthn", "lookup"] 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] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = 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.
420 421 422 423 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 420 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.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 430 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']) # 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 when the identity was not found, in which case it is assumed that is has been deleted already.
293 294 295 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 293 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']) # 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.
483 484 485 486 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 483 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.
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 493 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']) # 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. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
546 547 548 549 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 546 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. Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
556 557 558 559 560 561 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 556 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']) # 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.
610 611 612 613 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 610 def get_identity(id, opts = {}) data, _status_code, _headers = get_identity_with_http_info(id, opts) data end |
#get_identity_schema(id, opts = {}) ⇒ Object
Get Identity JSON Schema Return a specific identity schema.
679 680 681 682 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 679 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.
689 690 691 692 693 694 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 689 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']) # 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.
621 622 623 624 625 626 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 621 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", "totp", "oidc", "webauthn", "lookup_secret"] 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']) # 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.
743 744 745 746 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 743 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.
754 755 756 757 758 759 760 761 762 763 764 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 754 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 = [] 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']) # 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.
814 815 816 817 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 814 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.
826 827 828 829 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 882 883 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 826 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'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling IdentityApi.list_identities, must be greater than or equal to 1.' end # resource path local_var_path = '/admin/identities' # query parameters query_params = opts[:query_params] || {} query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'credentials_identifier'] = opts[:'credentials_identifier'] if !opts[:'credentials_identifier'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Identity>' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = 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.
891 892 893 894 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 891 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.
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 950 951 952 953 954 955 956 957 958 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 902 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'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" 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? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<IdentitySchemaContainer>' # auth_names auth_names = opts[:debug_auth_names] || [] = 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.
968 969 970 971 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 968 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.
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 981 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'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" 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[:'active'] = opts[:'active'] if !opts[:'active'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Session>' # auth_names auth_names = opts[:debug_auth_names] || ['oryAccessToken'] = 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.
1052 1053 1054 1055 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 1052 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.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 1065 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 = [] 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']) # 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.
1131 1132 1133 1134 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 1131 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.
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 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 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 1142 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']) # 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. It is possible to update the identity’s credentials as well.
1201 1202 1203 1204 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 1201 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. It is possible to update the identity's credentials as well.
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 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
# File 'lib/ory-kratos-client/api/identity_api.rb', line 1212 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']) # 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 |