oauth
OAuth (MCP)
The Nest-routed, bearer-authed half of the OAuth 2.1 authorization flow (consent context + decision) — see the MCP & OAuth guide for the full flow including the raw RFC endpoints.
2 نقاط النهاية
GET /api/v1/oauth/authorize/context
Client name, scope description, and mcp.access-eligible tenants for the consent screen.
معطيات المسار والاستعلام
| الاسم | الموضع | النوع | القيود |
|---|---|---|---|
clientIdمطلوب | query | string | ≥1 chars |
redirectUriمطلوب | query | string | ≥1 chars |
scopeمطلوب | query | string | ≥1 chars |
مثال بأمر curl
curl -X GET "https://your-institute.example/api/v1/oauth/authorize/context?clientId=institflow-cli-a1b2c3&redirectUri=string&scope=string" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"الاستجابات
| الاسم | النوع | القيود |
|---|---|---|
clientNameمطلوب | string | — |
scopeمطلوب | string | — |
membershipsمطلوب | array<object> | — |
{
"clientName": "string",
"scope": "string",
"memberships": [
{
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"tenantSlug": "string",
"tenantName": "string",
"membershipId": "e34c26d7-e34c-734c-84c2-e34c26d7e34c"
}
]
}تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
POST /api/v1/oauth/authorize/decision
Approve or deny an MCP client authorization request.
محتوى الطلب
| الاسم | النوع | القيود |
|---|---|---|
clientIdمطلوب | string | ≥1 chars |
redirectUriمطلوب | string | ≥1 chars |
stateمطلوب | string | — |
codeChallengeمطلوب | string | ≥1 chars |
codeChallengeMethodمطلوب | enum: "S256" | — |
scopeمطلوب | string | ≥1 chars |
membershipId | string (uuid) | — |
approveمطلوب | boolean | — |
مثال
{
"clientId": "institflow-cli-a1b2c3",
"redirectUri": "string",
"state": "string",
"codeChallenge": "string",
"codeChallengeMethod": "S256",
"scope": "string",
"membershipId": "e34c26d7-e34c-734c-84c2-e34c26d7e34c",
"approve": true
}مثال بأمر curl
curl -X POST "https://your-institute.example/api/v1/oauth/authorize/decision" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"clientId": "institflow-cli-a1b2c3",
"redirectUri": "string",
"state": "string",
"codeChallenge": "string",
"codeChallengeMethod": "S256",
"scope": "string",
"membershipId": "e34c26d7-e34c-734c-84c2-e34c26d7e34c",
"approve": true
}'الاستجابات
| الاسم | النوع | القيود |
|---|---|---|
redirectToمطلوب | string | — |
{
"redirectTo": "string"
}تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.
تُعيد مغلّف الخطأ المشترك `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. جميع الرموز مذكورة في دليل الاصطلاحات.