Klaro CMP
What is Klaro?
Section titled “What is Klaro?”Klaro is a self-hosted, EU-sovereign consent management platform.
Granit.Http.Cookies.Klaro provides KlaroConsentResolver which reads the Klaro consent
cookie and maps service-level consent to Granit cookie categories.
context.Services.AddGranitCookies(cookies =>{ // ... register cookies ... cookies.UseKlaro();});Configuration
Section titled “Configuration”{ "Http:Cookies:Klaro": { "CookieName": "klaro" }, "Http:Cookies": { "ThirdPartyServices": [ { "Name": "matomo", "Category": "Analytics", "CookiePatterns": ["^_pk_"] }, { "Name": "hubspot", "Category": "Marketing", "CookiePatterns": ["^__hs"] } ] }}Resolution logic
Section titled “Resolution logic”- Read the Klaro cookie from the request (name from
KlaroOptions.CookieName) - Parse as JSON:
{"serviceName": true/false, ...} - Find all service names mapped to the requested
CookieCategoryviaIThirdPartyServiceRegistry - Return
trueonly if all mapped services have consent granted - If no services are mapped for the category → return
false(fail-safe)
See also
Section titled “See also”- Cookies overview — module setup and cookie categories
- Consent & GPC —
IConsentResolver, opt-in/opt-out models - Regulation Bridge — wiring Klaro to regulation profiles
- Legal Agreements — surface terms/privacy notices alongside the CMP banner