MFA
MFA sistemi yönetim uçları dokümantasyonu.
Enums
Tanımlanan enum değerleri aşağıda listelenmiştir.
Politika Hedef Tipleri
entityType alanı için yapılan tanımlama. Kuralın hedeflediği varlık tipini belirtir.
| Type | Desc |
|---|---|
GENERAL | Genel politika. |
USER_ID | User id hedefli politika. |
IP | IP hedefli politika. |
Yöntemler
MFA yöntem uçları. SMS, MAIL, PUSH, TOTP gibi yöntemlerin ayalarlamaları için kullanılır.
Yöntemleri listele
Mevcut MFA yöntemlerini getirir.
Authentication
x-auth(tenant-id)
HTTP Request
GET /admin/system/mfa/methods
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
methodCode | string | false | - | Yöntem kodu |
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
methodCode | string | false | Yöntem kodu (unique) |
expireMs | number | false | Yöntem geçerlilik süresi |
renewStartMs | number | false | Yöntem yenileme için oluşturma anından itibaren geçmesi gereken süre |
Response Body Example
[
{
"methodCode": "PUSH_OTP",
"expireMs": 120000,
"renewStartMs": 80000
},
{
"methodCode": "PUSH",
"expireMs": 60000,
"renewStartMs": 0
},
{
"methodCode": "TOTP",
"expireMs": 0,
"renewStartMs": 0
},
{
"methodCode": "MAIL",
"expireMs": 120000,
"renewStartMs": 80000
},
{
"methodCode": "SMS",
"expireMs": 120000,
"renewStartMs": 80000
}
]
Errors
INVALID_FIELD
Yöntem ekle
Yeni MFA yöntem tanımlama ucu.
Authentication
x-auth(tenant-id)
HTTP Request
POST /admin/system/mfa/methods
Request Parameters
| Field | Type | Required | Desc |
|---|---|---|---|
methodCode | string | true | Yöntem kodu (unique) |
expireMs | number | true | Yöntem geçerlilik süresi |
renewStartMs | number | true | Yöntem yenileme için oluşturma anından itibaren geçmesi gereken süre |
Request Body Example
{
"methodCode": "PUSH_OTP",
"expireMs": 120000,
"renewStartMs": 80000
}
Response Body Example
{
"methodCode": "PUSH_OTP"
}
Errors
INVALID_FIELDRECORD_ALREADY_EXIST
Yöntem güncelle
Var olan yöntemi yenilemede kullanılır. Yalnızca gönderilen alanlar güncellenir. Başarılı olması için en az bir alan güncellenmelidir.
Authentication
x-auth(tenant-id)
HTTP Request
PATCH /admin/system/mfa/methods
Request Parameters
| Field | Type | Required | Desc |
|---|---|---|---|
methodCode | string | true | Yöntem kodu (unique) |
expireMs | number | false | Yöntem geçerlilik süresi |
renewStartMs | number | false | Yöntem yenileme için oluşturma anından itibaren geçmesi gereken süre |
Request Body Example
{
"methodCode": "PUSH_OTP",
"expireMs": 150000
}
Response Parameters
Başarılı olması durumunda 200 HTTP status code döner.
Errors
INVALID_FIELDRECORD_NOT_FOUND
Aksiyonlar
MFA aksiyon yönetim uçları. Yeni aksiyon eklendiğinde API kodunda da buna karşılık kod eklenmelidir.
Aksiyonları listele
Mevcut MFA aksiyonlarını getirir.
Authentication
x-auth(tenant-id)
HTTP Request
GET /admin/system/mfa/actions
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
actionCode | string | false | - | Aksiyon kodu |
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
actionCode | string | false | Aksiyon kodu (unique) |
title | json | false | Aksiyon başlığı. tr, en, ar lokalizasyon |
infoTableHeaders | json | false | Info table girdi alan isimleri. tr, en, ar lokalizasyon |
Response Body Example
[
{
"actionCode": "VERIFY_EMAIL",
"title": {
"tr": "E-posta Doğrulama",
"en": "Email Verification",
"ar": "التحقق من البريد الإلكتروني"
},
"infoTableHeaders": {
"ip_location": {
"tr": "IP / Lokayson",
"en": "IP / Location",
"ar": "عنوان IP / الموقع"
}
}
},
...
{
"actionCode": "LOGIN",
"title": {
"tr": "Hesap Giriş",
"en": "Account Login",
"ar": "تسجيل الدخول إلى الحساب"
},
"infoTableHeaders": {
"ip_location": {
"tr": "IP / Lokayson",
"en": "IP / Location",
"ar": "عنوان IP / الموقع"
},
"corporate_user_id": {
"tr": "Kurumsal Hesap",
"en": "Corporate Account",
"ar": "حساب مؤسسي"
},
"deviceDesc": {
"tr": "Cihaz Bilgisi",
"en": "Device Information",
"ar": "معلومات الجهاز"
}
}
}
]
Errors
INVALID_FIELD
Aksiyon ekle
Yeni MFA aksiyon tanımlama ucu.
Authentication
x-auth(tenant-id)
HTTP Request
POST /admin/system/mfa/actions
Request Parameters
| Field | Type | Required | Desc |
|---|---|---|---|
actionCode | string | true | Aksiyon kodu (unique) |
title | json | true | Aksiyon başlığı. tr, en, ar lokalizasyon |
infoTableHeaders | json | true | Info table girdi alan isimleri. tr, en, ar lokalizasyon |
Request Body Example
{
"actionCode": "VERIFY_EMAIL",
"title": {
"tr": "E-posta Doğrulama",
"en": "Email Verification",
"ar": "التحقق من البريد الإلكتروني"
},
"infoTableHeaders": {
"ip_location": {
"tr": "IP / Lokayson",
"en": "IP / Location",
"ar": "عنوان IP / الموقع"
}
}
}
Response Body Example
{
"actionCode": "VERIFY_EMAIL"
}
Errors
INVALID_FIELDRECORD_ALREADY_EXIST
Aksiyon güncelle
Var olan aksiyonu yenilemede kullanılır. Yalnızca gönderilen alanlar güncellenir. Başarılı olması için en az bir alan güncellenmelidir.
Authentication
x-auth(tenant-id)
HTTP Request
PATCH /admin/system/mfa/actions
Request Parameters
| Field | Type | Required | Desc |
|---|---|---|---|
actionCode | string | true | Aksiyon kodu (unique) |
title | json | false | Aksiyon başlığı. tr, en, ar lokalizasyon |
infoTableHeaders | json | false | Info table girdi alan isimleri. tr, en, ar lokalizasyon |
Request Body Example
{
"actionCode": "VERIFY_EMAIL",
"title": {
"tr": "E-posta Doğrulama",
"en": "Email Verification",
"ar": "التحقق من البريد الإلكتروني"
}
}
Response Parameters
Başarılı olması durumunda 200 HTTP status code döner.
Errors
INVALID_FIELDRECORD_NOT_FOUND
Politikalar
MFA genel politika yönetim uçları. Hangi aksiyon için hangi yöntemlerin hangi şablonlar ile kullanılacağı, kaç yöntem gerektiği gibi düzenlemeler politikalar ile kontrol yönetilir.
Politikaları listele
Mevcut MFA politikalarını getirir.
Authentication
x-auth(tenant-id)
HTTP Request
GET /admin/system/mfa/policies
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
id | number | false | Policy id |
actionCode | string | false | Aksiyon kodu |
name | string | false | Policy name |
entityType | string(enum) | false | Politika hedef tipi |
expireAt | number | false | Politika geçerlilik sona erme epoch ts (ms) |
type | string | false | Politika tipi |
detail | json | false | Politika ayrıntıları, tipe göre değişiklik gösterir |
Response Body Example
[
{
"id": 19,
"actionCode": "VERIFY_EMAIL",
"name": "Verify Email Policy",
"entityType": "GENERAL",
"expireAt": 1893456000000,
"type": "COMMON",
"detail": {
"methods": [
[
"MAIL",
"verifiedMail"
]
],
"required": 1
}
},
...
{
"id": 5,
"actionCode": "LOGIN",
"name": "Login Policy",
"entityType": "GENERAL",
"expireAt": 1893456000000,
"type": "COMMON",
"detail": {
"methods": [
[
"PUSH",
"loginPush"
],
[
"TOTP"
],
[
"MAIL",
"loginOtpMail"
],
[
"SMS",
"loginOtp"
]
],
"required": 1
}
}
]
Errors
INVALID_FIELD
Politika ekle (COMMON)
Yeni COMMON tipinde MFA politika tanımlama ucu. Her bir actionCode için yalnız bir COMMON tipinde politika eklenebilir.
Authentication
x-auth(tenant-id)
HTTP Request
POST /admin/system/mfa/policies/common
Request Parameters
| Field | Type | Required | Desc |
|---|---|---|---|
actionCode | string | true | Aksiyon kodu |
name | string | true | Policy name |
expireAt | number | true | Politika geçerlilik sona erme epoch ts (ms) |
required | number | true | Zorunlu yöntem sayısı |
preffered | number | true | Tercih edilen yöntem sayısı |
methods | array[][] | true | [methodCode, templateName] tuples |
Request Body Example
{
"actionCode": "VERIFY_EMAIL",
"name": "Verify Email Policy",
"expireAt": 1893456000000,
"required": 1,
"methods": [
["MAIL", "verifiedMail"]
]
}
Response Body Example
{
"id": 19
}
Errors
INVALID_FIELDRECORD_ALREADY_EXIST
Politika güncelle (COMMON)
Var olan COMMON politikayı yenilemede kullanılır. Yalnızca gönderilen alanlar güncellenir. Başarılı olması için en az bir alan güncellenmelidir.
Authentication
x-auth(tenant-id)
HTTP Request
PATCH /admin/system/mfa/policies/common
Request Parameters
| Field | Type | Required | Desc |
|---|---|---|---|
id | number | true | Policy id |
name | string | false | Policy name |
expireAt | number | false | Politika geçerlilik sona erme epoch ts (ms) |
required | number | false | Zorunlu yöntem sayısı |
preffered | number | false | Tercih edilen yöntem sayısı |
methods | array[][] | false | [methodCode, templateName] tuples |
Request Body Example
{
"id": 19,
"name": "Verify Email Policy",
"expireAt": 1893456000000,
"required": 1,
"methods": [
["MAIL", "verifiedMail"]
]
}
Response Parameters
Başarılı olması durumunda 200 HTTP status code döner.
Errors
INVALID_FIELDRECORD_NOT_FOUND