empreinte-digitale/orejime

Document the way of getting consent status

dogawaf opened this issue · 3 comments

Hello

In custom javascript code, it is sometimes usefull to get the consent status of a given app, when for example before writing a cookie.
Actually I use that: orejime.internals.manager.getConsent('my-app') but it sounds a little hacky.

Is there a better way to get the consent status of an app?

Regards

Hello,

For now it is the only way to do it but indeed it doesn't feel right...
We could proxy getConsent() at the top level object so it is usable directly, like orejime.getConsent('my-app').
(I would probably name it otherwise, I find the name getConsent a bit misleading).

Would it solve your problem ?
And while we're at it, do you see any other things that should be exposed publicly ?

Hello

Klaro! exposes directly the consentmanager.
I do not know if you keep the orejime fork updated with upstream Klaro, but maybe the way they did it could be nice.

https://kiprotect.com/docs/klaro/js_api

It seems fine to me, it could be nice to be able to access the entire manager from the outside.
(Sadly we do not keep our fork in sync because we had to make impacting changes that made merging really hard...)