Mediloop

Active context

Platform

Select the membership and tenant context used for authorization, attribution and data isolation.

Identity

One user identity

Membership

Tenant affiliation

Role

Functional access

Context

Tenant + membership

Overview

The active context identifies which tenant and membership a request is acting through. This context drives authorization and attribution.

Context headers

HeaderPurpose
X-Tenant-IdSelect the active tenant
X-Membership-IdSelect the professional / organization membership used for the action

Token claims

ClaimPurpose
subGlobal user identity
tenant_idCurrent or default tenant context where present
session_idSession attribution
roleCurrent role hint; authorization remains server-enforced

Request example

Context-aware requestCopy
GET /v1/appointments
Authorization: Bearer $ACCESS_TOKEN
X-Tenant-Id: tnt_123
X-Membership-Id: mbr_456

Security rules

The backend must validate that the membership belongs to the authenticated user and tenant. Client-provided context headers are never trusted by themselves.