20#ifndef ORES_IAM_MESSAGING_LOGIN_PROTOCOL_HPP
21#define ORES_IAM_MESSAGING_LOGIN_PROTOCOL_HPP
26namespace ores::iam::messaging {
31 std::string party_category;
32 std::string business_center_code;
36 using response_type =
struct login_response;
37 static constexpr std::string_view nats_subject =
"iam.v1.auth.login";
38 std::string principal;
42struct login_response {
44 std::string account_id;
45 std::string tenant_id;
46 std::string tenant_name;
49 bool password_reset_required =
false;
50 bool tenant_bootstrap_mode =
false;
51 bool party_setup_required =
false;
53 std::string error_message;
55 std::string selected_party_id;
56 std::vector<party_summary> available_parties;
63 int access_lifetime_s = 1800;
71 std::string session_id;
74struct logout_request {
75 using response_type =
struct logout_response;
76 static constexpr std::string_view nats_subject =
"iam.v1.auth.logout";
79struct logout_response {
84struct public_key_request {
85 static constexpr std::string_view nats_subject =
"iam.v1.auth.public-key";
96 static constexpr std::string_view nats_subject =
"iam.v1.auth.refresh";
103 bool success =
false;
128 using response_type =
struct service_login_response;
129 static constexpr std::string_view nats_subject =
"iam.v1.auth.service-login";
130 std::string username;
131 std::string password;
134struct service_login_response {
135 bool success =
false;
138 int access_lifetime_s = 1800;
Request to refresh a JWT token.
Definition login_protocol.hpp:94
Response to a token refresh request.
Definition login_protocol.hpp:102
int access_lifetime_s
Token lifetime in seconds for the newly issued token.
Definition login_protocol.hpp:111
Authenticates a service account and issues a JWT.
Definition login_protocol.hpp:127