LibQuicR
quicr::messages::Token Struct Reference

#include <ctrl_message_types.h>

Public Types

enum class  AliasType : std::uint64_t { kDelete = 0x0 , kRegister = 0x1 , kUseAlias = 0x2 , kUseValue = 0x3 }
 Operation encoded at the beginning of an authorization-token value. More...
 

Public Member Functions

bool operator== (const Token &other) const =default
 

Public Attributes

AliasType alias_type { AliasType::kUseValue }
 Alias operation. More...
 
std::optional< std::uint64_t > token_alias
 Alias required for delete, register, and use-alias operations. More...
 
std::optional< std::uint64_t > token_type
 Application-defined token type required when a value is present. More...
 
Bytes token_value
 Sensitive opaque token bytes; never log this field. More...
 

Detailed Description

Authorization token reference or value.

Token payload bytes are sensitive and opaque. They must not be logged, interpreted by this serialization layer, or embedded in diagnostics.

Member Enumeration Documentation

◆ AliasType

enum quicr::messages::Token::AliasType : std::uint64_t
strong

Operation encoded at the beginning of an authorization-token value.

Enumerator
kDelete 

Delete the specified cached alias.

kRegister 

Register alias, token type, and token value.

kUseAlias 

Refer to a previously registered alias.

kUseValue 

Carry a token type and token value directly.

Member Function Documentation

◆ operator==()

bool quicr::messages::Token::operator== ( const Token &  other) const
default

Compares all token fields byte-for-byte.

Parameters
otherToken to compare.
Returns
Whether all fields are equal.

Member Data Documentation

◆ alias_type

AliasType quicr::messages::Token::alias_type { AliasType::kUseValue }

Alias operation.

◆ token_alias

std::optional<std::uint64_t> quicr::messages::Token::token_alias

Alias required for delete, register, and use-alias operations.

◆ token_type

std::optional<std::uint64_t> quicr::messages::Token::token_type

Application-defined token type required when a value is present.

◆ token_value

Bytes quicr::messages::Token::token_value

Sensitive opaque token bytes; never log this field.


The documentation for this struct was generated from the following file: