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
-
#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_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
This endpoint returns the session object with expandables specified.
-
#get_session_with_http_info(id, opts = {}) ⇒ Array<(Session, Integer, Hash)>
This endpoint returns the session object with expandables specified.
-
#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
#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.
27 28 29 30 |
# File 'lib/ory-client/api/identity_api.rb', line 27 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.
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 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.
91 92 93 94 |
# File 'lib/ory-client/api/identity_api.rb', line 91 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.
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_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.
155 156 157 158 |
# File 'lib/ory-client/api/identity_api.rb', line 155 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.
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_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.
219 220 221 222 |
# File 'lib/ory-client/api/identity_api.rb', line 219 def delete_identity(id, opts = {}) delete_identity_with_http_info(id, opts) nil 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.
282 283 284 285 |
# File 'lib/ory-client/api/identity_api.rb', line 282 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.
292 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 |
# File 'lib/ory-client/api/identity_api.rb', line 292 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.
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 |
# File 'lib/ory-client/api/identity_api.rb', line 229 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.
345 346 347 348 |
# File 'lib/ory-client/api/identity_api.rb', line 345 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.
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/ory-client/api/identity_api.rb', line 355 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.
408 409 410 411 |
# File 'lib/ory-client/api/identity_api.rb', line 408 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.
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
# File 'lib/ory-client/api/identity_api.rb', line 418 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.
472 473 474 475 |
# File 'lib/ory-client/api/identity_api.rb', line 472 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.
537 538 539 540 |
# File 'lib/ory-client/api/identity_api.rb', line 537 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.
547 548 549 550 551 552 553 554 555 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 |
# File 'lib/ory-client/api/identity_api.rb', line 547 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.
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/ory-client/api/identity_api.rb', line 483 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 # 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
This endpoint returns the session object with expandables specified. This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
601 602 603 604 |
# File 'lib/ory-client/api/identity_api.rb', line 601 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)>
This endpoint returns the session object with expandables specified. This endpoint is useful for: Getting a session object with all specified expandables that exist in an administrative context.
612 613 614 615 616 617 618 619 620 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 |
# File 'lib/ory-client/api/identity_api.rb', line 612 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 = ["Devices", "Identity"] 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.
671 672 673 674 |
# File 'lib/ory-client/api/identity_api.rb', line 671 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.
682 683 684 685 686 687 688 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 736 737 738 |
# File 'lib/ory-client/api/identity_api.rb', line 682 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? # 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.
746 747 748 749 |
# File 'lib/ory-client/api/identity_api.rb', line 746 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.
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 806 807 808 809 810 811 812 813 |
# File 'lib/ory-client/api/identity_api.rb', line 757 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.
823 824 825 826 |
# File 'lib/ory-client/api/identity_api.rb', line 823 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.
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 884 885 886 887 888 889 890 891 892 893 894 895 896 897 |
# File 'lib/ory-client/api/identity_api.rb', line 836 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.
907 908 909 910 |
# File 'lib/ory-client/api/identity_api.rb', line 907 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.
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 |
# File 'lib/ory-client/api/identity_api.rb', line 920 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 = ["Devices", "Identity"] 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.
986 987 988 989 |
# File 'lib/ory-client/api/identity_api.rb', line 986 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.
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
# File 'lib/ory-client/api/identity_api.rb', line 997 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.
1056 1057 1058 1059 |
# File 'lib/ory-client/api/identity_api.rb', line 1056 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.
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 |
# File 'lib/ory-client/api/identity_api.rb', line 1067 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 |