Master Vendor
API Documentation
Public reference untuk integrasi SSO, user sync, dan token verification.
Base URL
https://vendor.ilectraev.com
OAuth 2.0 Authorization Code + PKCE
Flow login browser untuk aplikasi yang ingin memakai Master Vendor sebagai pusat SSO.
GET
/oauth/authorize
| Query | Wajib | Keterangan |
|---|---|---|
response_type | Ya | Gunakan code. |
client_id | Ya | Client ID aplikasi terdaftar. |
redirect_uri | Ya | Harus persis sama dengan whitelist aplikasi. |
scope | Tidak | Contoh: openid email profile. |
state | Disarankan | Nilai anti-CSRF dari aplikasi. |
code_challenge | Ya | PKCE S256 challenge. |
code_challenge_method | Tidak | Default S256. |
POST
/oauth/token
Kirim sebagai application/x-www-form-urlencoded.
| Field | Wajib | Keterangan |
|---|---|---|
grant_type | Ya | Gunakan authorization_code. |
client_id | Ya | Client ID aplikasi. |
client_secret | Ya | Client secret aplikasi. |
code | Ya | Authorization code dari callback. |
redirect_uri | Ya | Harus sama dengan request authorize. |
code_verifier | Ya | PKCE verifier asli. |
{
"access_token": "eyJ...",
"token_type": "Bearer",
"expires_in": 900
}
OIDC Discovery & Token Keys
GET
/.well-known/openid-configurationGET
/oauth/jwksGunakan JWKS untuk verifikasi JWT RS256 di aplikasi client.
User Info
GET
/oauth/userinfoMembaca user dari session Master Vendor yang sedang login.
App User Management
Endpoint server-to-server memakai Basic Auth dengan client_id sebagai username dan client_secret sebagai password.
POST
/api/apps/{app_id}/users/sync{
"email": "[email protected]",
"password": "temporary-password",
"external_user_id": "supplier-1001"
}
POST
/api/apps/{app_id}/users/disable{
"external_user_id": "supplier-1001"
}
Operational
GET
/healthz{
"status": "ok"
}