9 rute de platformă, cu exemplu de cerere pentru fiecare.
Adresa de bază: https://app.ilustromania.com/nucleu. Autentificarea, formatul și erorile sunt în Prezentarea API-ului.
GET/.well-known/oauth-authorization-server
Metadatele serverului OAuth
Documentul RFC 8414 al serverului de autorizare: căi, granturi, metode. Public.
curl https://app.ilustromania.com/nucleu/.well-known/oauth-authorization-serverconst raspuns = await fetch("https://app.ilustromania.com/nucleu/.well-known/oauth-authorization-server");
const date = await raspuns.json();import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/.well-known/oauth-authorization-server",
)
date = raspuns.json()GET/.well-known/oauth-protected-resource
Metadatele resursei OAuth
Documentul RFC 9728 al resursei protejate (serverul MCP). Public.
curl https://app.ilustromania.com/nucleu/.well-known/oauth-protected-resourceconst raspuns = await fetch("https://app.ilustromania.com/nucleu/.well-known/oauth-protected-resource");
const date = await raspuns.json();import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/.well-known/oauth-protected-resource",
)
date = raspuns.json()POST/v1/oauth/acord
Acordul OAuth
Omul permite (cod de o folosință) sau refuză (access_denied); cererea se consumă o singură dată, doar de pe originea aplicației.
curl -X POST https://app.ilustromania.com/nucleu/v1/oauth/acord \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE" \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/acord", {
method: "POST",
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import os
import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/oauth/acord",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
json={ … },
)
date = raspuns.json()GET/v1/oauth/autorizeaza
Autorizarea OAuth
Pornește autorizarea și duce omul la ecranul de acord; la orice nepotrivire răspunde 400, fără redirect. Limitată pe IP.
curl https://app.ilustromania.com/nucleu/v1/oauth/autorizeazaconst raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/autorizeaza");
const date = await raspuns.json();import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/oauth/autorizeaza",
)
date = raspuns.json()GET/v1/oauth/cerere/{id}
Cererea de pe ecranul de acord
Ce vede omul logat pe ecranul de acord: numele clientului, gazda de întoarcere și firmele contului.
| Nume | Tip | Descriere |
|---|---|---|
id | string | identificatorul resursei |
curl https://app.ilustromania.com/nucleu/v1/oauth/cerere/{id} \
-H "Cookie: __Host-sesiune=$JETON_SESIUNE"const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/cerere/{id}", {
headers: {
"Cookie": `__Host-sesiune=${process.env.JETON_SESIUNE}`,
},
});
const date = await raspuns.json();import os
import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/oauth/cerere/{id}",
headers={"Cookie": "__Host-sesiune=" + os.environ["JETON_SESIUNE"]},
)
date = raspuns.json()POST/v1/oauth/inregistreaza
Înregistrarea dinamică a clientului OAuth
Înregistrare RFC 7591 a unui client OAuth; doar JSON, limitată pe IP pe oră.
curl -X POST https://app.ilustromania.com/nucleu/v1/oauth/inregistreaza \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/inregistreaza", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/oauth/inregistreaza",
json={ … },
)
date = raspuns.json()POST/v1/oauth/jeton
Jetonul OAuth
Schimbă codul de autorizare sau jetonul de reîmprospătare pe jeton de acces; limitată.
curl -X POST https://app.ilustromania.com/nucleu/v1/oauth/jeton \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/jeton", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/oauth/jeton",
json={ … },
)
date = raspuns.json()GET/v1/oauth/resursa
Metadatele resursei OAuth (alias)
Același document al resursei protejate, sub prefixul OAuth. Public.
curl https://app.ilustromania.com/nucleu/v1/oauth/resursaconst raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/resursa");
const date = await raspuns.json();import requests
raspuns = requests.get(
"https://app.ilustromania.com/nucleu/v1/oauth/resursa",
)
date = raspuns.json()curl -X POST https://app.ilustromania.com/nucleu/v1/oauth/revoca \
-H "Content-Type: application/json" \
-d '{ … }'const raspuns = await fetch("https://app.ilustromania.com/nucleu/v1/oauth/revoca", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ … }),
});
const date = await raspuns.json();import requests
raspuns = requests.post(
"https://app.ilustromania.com/nucleu/v1/oauth/revoca",
json={ … },
)
date = raspuns.json()