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;
35 using response_type =
struct login_response;
36 static constexpr std::string_view nats_subject =
"iam.v1.auth.login";
37 std::string principal;
41struct login_response {
43 std::string account_id;
44 std::string tenant_id;
45 std::string tenant_name;
48 bool password_reset_required =
false;
49 bool tenant_bootstrap_mode =
false;
51 std::string error_message;
53 std::string selected_party_id;
54 std::vector<party_summary> available_parties;
61 int access_lifetime_s = 1800;
64struct logout_request {
65 using response_type =
struct logout_response;
66 static constexpr std::string_view nats_subject =
"iam.v1.auth.logout";
69struct logout_response {
74struct public_key_request {
75 static constexpr std::string_view nats_subject =
"iam.v1.auth.public-key";
86 static constexpr std::string_view nats_subject =
"iam.v1.auth.refresh";
118 using response_type =
struct service_login_response;
119 static constexpr std::string_view nats_subject =
"iam.v1.auth.service-login";
120 std::string username;
121 std::string password;
124struct service_login_response {
125 bool success =
false;
128 int access_lifetime_s = 1800;
Request to refresh a JWT token.
Definition login_protocol.hpp:84
Response to a token refresh request.
Definition login_protocol.hpp:92
int access_lifetime_s
Token lifetime in seconds for the newly issued token.
Definition login_protocol.hpp:101
Authenticates a service account and issues a JWT.
Definition login_protocol.hpp:117