blob: 2af46f2cb14febf6ea3b12cbe967b7255a860143 [file] [log] [blame]
Ed Tanous7c8e0642022-02-21 12:11:14 -08001#pragma once
2
Ed Tanous7c8e0642022-02-21 12:11:14 -08003#include "persistent_data.hpp"
4
Ed Tanous7c8e0642022-02-21 12:11:14 -08005#include <boost/asio/ip/address.hpp>
6#include <boost/asio/ssl/verify_context.hpp>
7
8#include <memory>
Ed Tanous724985f2024-06-05 09:19:06 -07009#include <string_view>
Ed Tanous7c8e0642022-02-21 12:11:14 -080010
Ed Tanous724985f2024-06-05 09:19:06 -070011std::string getUsernameFromCommonName(std::string_view commonName);
Ed Tanous3ce36882024-06-09 10:58:16 -070012
Ed Tanous724985f2024-06-05 09:19:06 -070013std::shared_ptr<persistent_data::UserSession>
Ed Tanous7c8e0642022-02-21 12:11:14 -080014 verifyMtlsUser(const boost::asio::ip::address& clientIp,
Ed Tanous724985f2024-06-05 09:19:06 -070015 boost::asio::ssl::verify_context& ctx);