feat(CIE): Implement OIDC RP Service with login, callback, and session management

This commit is contained in:
gabdevele
2026-06-16 23:33:59 +02:00 Unverified
parent bb7ed18539
commit 5f81d2dcf7
31 changed files with 3218 additions and 4 deletions
+44
View File
@@ -0,0 +1,44 @@
#pragma once
#include <json/json.h>
#include "common/OidcJwt.h"
#include <string>
#include <vector>
namespace visione::oidc
{
struct RpProviderConfig
{
std::string issuer;
std::string trustAnchor;
std::string profile;
};
struct RpConfig
{
bool enabled{false};
std::string baseUrl;
std::string clientId;
std::string redirectUri;
std::string postLoginRedirectUri;
std::string organizationName;
std::string clientName;
std::vector<std::string> contacts;
std::string jwksPath;
std::string federationJwksPath;
std::vector<std::string> trustAnchors;
std::vector<RpProviderConfig> providers;
std::vector<Jwk> federationJwks;
std::vector<Jwk> coreJwks;
Json::Value trustMark;
};
RpConfig loadRpConfig();
Json::Value rpMetadataDocument(const RpConfig &config);
Json::Value rpPublicJwksDocument(const RpConfig &config);
Json::Value entityConfigurationDocument(const RpConfig &config);
std::optional<RpProviderConfig> findProviderConfig(const RpConfig &config,
const std::string &provider);
} // namespace visione::oidc