Müşteri Güvenliği
Şifreyi, doğrulamayı, iki adımlı girişi ve müşteriye özel güvenlik kurallarını yöneten beş uç.
Genel Bakış
Bu beş uç müşterinin hesabına operatör tarafından uygulanan güvenlik kararlarını taşır: şifreyi değiştirmek, bir alanı doğrulanmış saymak, iki adımlı doğrulamayı açmak, giriş ve ödeme kurallarını sıkmak, destek hakkını kısmak.
Hiçbiri müşteriye soru sormaz. Hepsi doğrudan uygulanır, o yüzden bu uçları taşıyan bir anahtarın kapsamı dar tutulur.
Referans
Şifre Değiştirme
Müşterinin şifresini doğrudan değiştirir. Mevcut şifre istenmez.
options/password-length karakter; varsayılan 6.password ile birebir aynı olmalı. Göndermezseniz doğrulama yapılmaz.error.details.min ile geri döner.curl -X PUT 'https://panel.ornek.com/api/v1/admin/clients/42/password' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"password":"Str0ngP@ssw0rd","password_confirmation":"Str0ngP@ssw0rd"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/password', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
password: 'Str0ngP@ssw0rd',
password_confirmation: 'Str0ngP@ssw0rd',
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/password');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'password' => $newPassword,
'password_confirmation' => $newPassword,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->SetClientPassword([
'id' => 42,
'password' => $newPassword,
]);E-posta ve Telefon Doğrulama
Bir alanı doğrulanmış olarak işaretler. Müşteriye kod gönderilmez; işaret doğrudan konur.
email ya da phone.email ya da phone.type iki değerden biri değil.curl -X POST 'https://panel.ornek.com/api/v1/admin/clients/42/verify' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"email"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/verify', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ type: 'email' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/verify');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['type' => 'email']),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Kendi doğrulama akışınızı çalıştırdıktan sonra işareti buradan koyarsınız.
$response = Api::Clients()->VerifyClient([
'id' => 42,
'type' => 'email',
]);İki Adımlı Doğrulama
Müşterinin iki adımlı doğrulamasını açar ya da kapatır.
GoogleAuthenticator. Yalnız açarken zorunlu; kapatırken gerekmez.method yok.curl -X PUT 'https://panel.ornek.com/api/v1/admin/clients/42/2fa' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"enabled":true,"method":"GoogleAuthenticator"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/2fa', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ enabled: true, method: 'GoogleAuthenticator' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/2fa');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'method' => 'GoogleAuthenticator',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Kapatırken method göndermeye gerek yok.
$response = Api::Clients()->SetClient2fa([
'id' => 42,
'enabled' => false,
]);Güvenlik Ayarları
Müşteriye özel güvenlik kurallarını değiştirir. Yalnız gönderdiğiniz alan değişir.
clients/document-filters.curl -X PATCH 'https://panel.ornek.com/api/v1/admin/clients/42/security-settings' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"block_proxy":true,"blocked_gateways":["PayPal"]}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/security-settings', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ block_proxy: true, blocked_gateways: ['PayPal'] }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/security-settings');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'block_proxy' => true,
'blocked_gateways' => ['PayPal'],
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->UpdateClientSecuritySettings([
'id' => 42,
'block_proxy' => true,
]);Destek Ayarları
Müşterinin destek talebi açma hakkını kısıtlar ya da tamamen kapatır.
curl -X PATCH 'https://panel.ornek.com/api/v1/admin/clients/42/support-settings' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"ticket_restricted":true}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/support-settings', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ticket_restricted: true }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/support-settings');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['ticket_restricted' => true]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->UpdateClientSupportSettings([
'id' => 42,
'ticket_restricted' => true,
]);Tuzaklar
Uç bir operatör aracıdır: mevcut şifreyi bilmeden yenisini yazar. Müşterinin kendi şifresini değiştirdiği akış bu değildir, o Müşteri API'sindedir.
verify yalnız işareti koyar; müşteriye e-posta ya da SMS gitmez. Kendi doğrulama akışınızı çalıştırdıktan sonra çağırın, yerine değil.
block_proxy engeller, allow_proxy muaf tutar. İkisini birlikte açık göndermek çelişkili bir durum bırakır; hangisini istiyorsanız yalnız onu gönderin.
İlgili Makaleler
Geri bildiriminiz için teşekkürler!
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.