20#ifndef ORES_SECURITY_JWT_JWT_CLAIMS_HPP
21#define ORES_SECURITY_JWT_JWT_CLAIMS_HPP
28namespace ores::security::jwt {
72 std::optional<std::string>
email;
125 c.
issued_at = std::chrono::system_clock::now();
Represents the claims extracted from a JWT token.
Definition jwt_claims.hpp:33
std::string subject
Subject claim - typically the account ID.
Definition jwt_claims.hpp:37
std::optional< std::string > session_id
Optional session ID for tracking sessions.
Definition jwt_claims.hpp:81
std::chrono::system_clock::time_point issued_at
Time when the token was issued.
Definition jwt_claims.hpp:57
std::optional< std::string > tenant_id
Optional tenant ID (UUID string).
Definition jwt_claims.hpp:97
std::optional< std::string > party_id
Optional party ID (UUID string, nil UUID if no party selected).
Definition jwt_claims.hpp:104
std::optional< std::chrono::system_clock::time_point > session_start_time
Optional session start time for efficient database updates.
Definition jwt_claims.hpp:90
static jwt_claims with_ttl(std::chrono::seconds ttl)
Create a claims object with issued_at set to now and expires_at set to now + ttl.
Definition jwt_claims.hpp:123
std::string audience
Intended audience for the token.
Definition jwt_claims.hpp:47
std::vector< std::string > visible_party_ids
List of visible party IDs (UUID strings) for the session.
Definition jwt_claims.hpp:112
std::optional< std::string > username
Optional username claim.
Definition jwt_claims.hpp:67
std::chrono::system_clock::time_point expires_at
Time when the token expires.
Definition jwt_claims.hpp:52
std::vector< std::string > roles
User roles/permissions.
Definition jwt_claims.hpp:62
std::string issuer
Issuer of the token.
Definition jwt_claims.hpp:42
std::optional< std::string > email
Optional email claim.
Definition jwt_claims.hpp:72