Enterprise
Bring your own identity and provision organizations programmatically. Enterprise plans unlock two features: identity federation (Custom Accounts) and the control-plane API.
Plan gating
Both features are unlocked by your subscription plan: Custom Accounts (Identity Federation) lets your users sign in to Hedgehog widgets with the identity your system already holds, and the Control Plane API lets your backend provision and manage organizations machine-to-machine. Contact us to enable them on your plan.
Control-plane keys
Control-plane requests authenticate with an API key scoped to your billing group. A billing-group admin creates keys in the dashboard under Billing → API keys. The full secret — in the form <kid>.<secret> — is shown once at creation; only a hash is stored, so copy it immediately. Keys can be revoked at any time from the same page.
Send the key on every control-plane request in the Authorization header with the ControlPlane scheme.
Provisioning organizations
Create one organization per site, tenant, or workspace in your product. The origin is the URL where you'll embed the widgets (it powers CORS and OAuth). Creation counts against your plan's organization limit — exceeding it returns 402, and a conflicting origin returns 409.
Identity federation
By default, viewers sign in through the widget's built-in OAuth flow (hedgehog mode). In federated mode, your identity provider is the source of truth: your backend signs a short-lived assertion for the current user, exchanges it for a Hedgehog access token, and passes that token to the widget. Hedgehog never sees your users' credentials.
- Register a signing key — the public key of the keypair your identity provider signs with.
- Switch the organization to federated mode.
- Exchange assertions for access tokens at login time.
Both steps are also available in the dashboard on each organization's Federation page. Federated sign-in activates only when the organization is in federated mode, has at least one active signing key, and your plan includes Custom Accounts.
The assertion
An assertion is a compact JWS signed with an asymmetric algorithm — symmetric algorithms and alg: none are rejected. The kid header selects which registered signing key verifies the signature; the key material inside the token itself is never trusted.
Exchange it for an access token — no other credential is needed; the assertion is the credential. Any verification failure returns an opaque 401 by design, so callers learn nothing about why a forged assertion failed.
Accounts are created on first sign-in, keyed deterministically by your sub value and scoped to the organization — the same user always resolves to the same Hedgehog account, and display-name changes sync on each login.
Key rotation
Signing keys rotate by kid: register the new public key under a new kid, start signing assertions with it, then revoke the old key. Multiple keys can be active at once, so rotation needs no downtime. Keys move through active, retiring, and revoked states; only active keys verify assertions.
Destroying an organization
Deleting an organization is a hard, irreversible cascade: comments, reactions, notifications, themes, assets, federated accounts, permissions, and auth settings are all permanently removed. There is no undo.
Interactive API reference
When your plan includes the Control Plane API, the dashboard's Billing → API page shows a live reference of every enterprise endpoint — request and response schemas generated from the running API, with a built-in request runner to try calls against your own organizations.