File authentication_spi.hpp
File List > astutedds > security > authentication_spi.hpp
Go to the documentation of this file
//
// Copyright (c) 2026, Astute Systems PTY LTD
//
// This file is part of the Astute DDS developed by Astute Systems.
//
// See the commercial LICENSE file in the project root for full license details.
//
#pragma once
#include "security_types.hpp"
#include <astutedds/rtps/rtps_types.hpp>
#include <memory>
namespace astutedds::security
{
class AuthenticationPlugin
{
public:
virtual ~AuthenticationPlugin() = default;
virtual IdentityHandle validate_local_identity(const CertificateCredentials& identity_credential,
uint32_t domain_id, const PropertySeq& participant_qos,
SecurityException& ex) = 0;
virtual Token get_identity_token(IdentityHandle local_identity_handle, SecurityException& ex) = 0;
virtual IdentityHandle validate_remote_identity(IdentityHandle local_identity_handle,
const Token& remote_identity_token, const rtps::GUID_t& remote_guid,
SecurityException& ex) = 0;
virtual bool begin_handshake_request(IdentityHandle initiator_identity_handle,
IdentityHandle replier_identity_handle, const Token* handshake_message_in,
Token& handshake_message_out, SecurityException& ex) = 0;
virtual bool begin_handshake_reply(IdentityHandle initiator_identity_handle, IdentityHandle replier_identity_handle,
const Token& handshake_message_in, Token& handshake_message_out,
SecurityException& ex) = 0;
virtual bool process_handshake(IdentityHandle local_identity_handle, IdentityHandle remote_identity_handle,
const Token& handshake_message_in, SecurityException& ex) = 0;
virtual Token get_shared_secret(IdentityHandle local_identity_handle, IdentityHandle remote_identity_handle,
SecurityException& ex) = 0;
virtual bool return_identity_handle(IdentityHandle identity_handle, SecurityException& ex) = 0;
};
using AuthenticationPluginPtr = std::shared_ptr<AuthenticationPlugin>;
} // namespace astutedds::security