16 std::string
scheme =
"pulp-inspector-hmac-sha256-v1";
28 std::string session_id,
29 std::string instance_id,
30 std::string publication_id,
31 std::string protocol_version);
36 std::span<const std::uint8_t> token,
42 std::span<const std::uint8_t> token,
44 std::string_view client_proof);
46 std::span<const std::uint8_t> token,
48 std::string_view client_proof,
49 std::string_view server_proof);
65 bool verify(std::string_view proof_hex);
67 std::string_view client_proof);
71 std::vector<std::uint8_t> token_;
73 bool consumed_ =
false;
InspectorAuthVerifier & operator=(InspectorAuthVerifier &&)=delete
InspectorAuthVerifier(InspectorAuthVerifier &&)=delete
InspectorAuthVerifier & operator=(const InspectorAuthVerifier &)=delete
const InspectorAuthChallenge & challenge() const
Definition authentication.hpp:64
bool consumed() const
Definition authentication.hpp:68
std::optional< std::string > authenticate(std::string_view client_proof)
bool verify(std::string_view proof_hex)
InspectorAuthVerifier(const InspectorAuthVerifier &)=delete
InspectorAuthVerifier(std::vector< std::uint8_t > token, InspectorAuthChallenge challenge)
Definition agent_context.hpp:7
std::optional< std::string > make_inspector_server_auth_proof(std::span< const std::uint8_t > token, const InspectorAuthChallenge &challenge, std::string_view client_proof)
Construct and verify the distinct server-side transcript proof returned after the client proof succee...
std::optional< InspectorAuthChallenge > make_inspector_auth_challenge(std::string session_id, std::string instance_id, std::string publication_id, std::string protocol_version)
bool verify_inspector_server_auth_proof(std::span< const std::uint8_t > token, const InspectorAuthChallenge &challenge, std::string_view client_proof, std::string_view server_proof)
constexpr std::size_t inspector_nonce_size
Definition authentication.hpp:13
std::optional< std::string > make_inspector_auth_proof(std::span< const std::uint8_t > token, const InspectorAuthChallenge &challenge)
Construct the versioned HMAC proof used by installed clients.
constexpr std::size_t inspector_token_size
Definition authentication.hpp:12
std::optional< std::vector< std::uint8_t > > generate_inspector_secret()
Generate a per-session 256-bit token or per-connection 256-bit nonce.
Definition authentication.hpp:15
std::string instance_id
Definition authentication.hpp:19
std::string nonce_hex
Definition authentication.hpp:17
std::string protocol_version
Definition authentication.hpp:21
std::string session_id
Definition authentication.hpp:18
std::string scheme
Definition authentication.hpp:16
std::string publication_id
Definition authentication.hpp:20