feat(CIE): Implement OIDC RP Service with login, callback, and session management
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user