ores.iam.account_messages

Table of Contents

The account protocol messages.

1. Includes

#include "ores.iam.api/domain/account.hpp"
#include "ores.iam.api/domain/login_info.hpp"
#include <string>
#include <vector>

2. Messages

The publish trigger is declared here beside the operations, because it is a subject IAM owns and nothing else states it: the DQ artefact-type row that publishes onto it carries the same string in SQL, and a constant generated from here is what the registrar subscribes with.

2.1. publish_accounts_from_dq_request

/**
 * @brief The workflow step that publishes a DQ-cleared accounts bundle.
 *
 * A trigger rather than a request: the DQ publisher sends it and reads no
 * reply, so it states a subject and no response. Its body is the DQ artefact
 * the server-side function knows how to expand, which is why it declares no
 * fields.
 */

2.2. save_account_request

2.2.1. principal

2.2.2. password

2.2.3. totp_secret

2.2.4. email

2.2.5. account_type

2.3. update_account_request

2.3.1. account_id

2.3.2. email

2.3.3. full_name

/**
 * @brief The account holder's full (real) name. Empty clears it.
 */

2.3.4. default_party_id

/**
 * @brief Party to set as the account's default quick-login party.
 * Empty clears the default. Must be one of the account's assigned
 * parties (validated server-side).
 */

2.3.5. job_title

/**
 * @brief Job title / functional role of the person holding this
 * account (e.g. "Head of Desk", "Senior Trader"). Empty clears it.
 */

2.3.6. reports_to_account_id

/**
 * @brief The account this person reports to. Empty clears it. Must
 * be another account in the same tenant (validated server-side).
 */

2.3.7. image_id

/**
 * @brief Profile picture for this account. Empty clears it. Must
 * reference an existing image (validated server-side).
 */

2.3.8. change_reason_code

2.3.9. change_commentary

2.4. update_account_response

2.4.1. success

2.4.2. message

2.5. save_account_response

2.5.1. success

2.5.2. message

2.5.3. account_id

2.6. delete_account_request

2.6.1. account_id

2.7. delete_account_response

2.7.1. success

2.7.2. message

2.8. account_operation_result

2.8.1. success

2.8.2. message

2.9. lock_account_request

2.9.1. account_ids

2.10. lock_account_response

2.10.1. results

2.11. unlock_account_request

2.11.1. account_ids

2.12. unlock_account_response

2.12.1. results

2.13. reset_password_request

2.13.1. account_ids

2.13.2. new_password

2.14. reset_password_response

2.14.1. success

2.14.2. message

2.14.3. results

2.15. change_password_request

2.15.1. current_password

2.15.2. new_password

2.16. change_password_response

2.16.1. success

2.16.2. message

2.17. update_my_email_request

2.17.1. email

2.18. update_my_email_response

2.18.1. success

2.18.2. message

2.19. set_my_default_party_request

2.19.1. party_id

2.20. set_my_default_party_response

2.20.1. success

2.20.2. message

2.21. select_party_request

2.21.1. party_id

2.22. switch_party_request

/**
 * @brief Re-scopes an *already-logged-in* session to a different party.
 *
 * Deliberately a separate subject/handler from select_party rather than a
 * relaxed version of it: select_party only accepts a narrowly-scoped,
 * single-use token (audience "select_party_only") issued exclusively by
 * the login flow, by design -- see account_operations_handler.hpp's select_party for
 * why. switch_party accepts a normal, already-authenticated session token
 * instead (any token that is NOT that single-use one), so an account with
 * access to more than one party (e.g. a tenant admin with cross-entity
 * access) can change which party's data is in view mid-session without
 * logging out and back in. Same party-membership check and new-token
 * issuance as select_party otherwise.
 */

2.22.1. party_id

2.23. select_party_response

2.23.1. success

2.23.2. message

2.23.3. token

2.23.4. username

2.23.5. tenant_name

2.23.6. party_name

2.23.7. party_setup_required

/**
 * @brief True when the selected party's status is 'Inactive'.
 * The client should present the PartyProvisioningWizard immediately.
 */

2.23.8. party_setup_warning

/**
 * @brief Set when the party provisioner wizard has completed
 * (onboarding.party = true) but the party is still Inactive. The
 * client should show a message instead of re-launching the wizard.
 */

2.23.9. access_lifetime_s

/**
 * @brief Token lifetime in seconds for the newly issued token.
 *
 * Clients re-arm the proactive refresh timer using this value.
 */

2.24. change_password_request_typed

2.24.1. current_password

2.24.2. new_password

Emacs 29.3 (Org mode 9.6.15)