Oturum İptal Et
Belirli bir oturumu iptal eder (UUID ile).
Endpoint
POST /api/v1/sessions/\{uuid\}/revoke
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
sessions.revoke- Tüm oturumları iptal etmesessions.revoke.own- Sadece kendi oturumlarını iptal etme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Path Parameters
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
uuid | string | Evet | Oturum UUID'si |
Response
Success Response (200 OK)
{
"message": "Session revoked",
"session": {
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Chrome on Windows",
"ip_address": "192.168.1.1",
"device_name": "My Computer",
"created_at": "2025-11-20T12:00:00.000000Z"
}
}
Error Responses
404 Not Found
{
"message": "Token not found"
}
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL
curl -X POST https://api.example.com/api/v1/sessions/550e8400-e29b-41d4-a716-446655440000/revoke \
-H "Authorization: Bearer \{token\}"
Notes
- Token UUID ile bulunur ve silinir
.ownpermission'ı olan kullanıcılar sadece kendi oturumlarını iptal edebilir- İptal edilen token'lar kullanılamaz
- İptal edilen oturum bilgileri response'da döner
Related Endpoints
- Tüm Oturumları İptal Et - Tüm oturumları iptal et (mevcut hariç)
- Oturum Listesi - Tüm oturumları listele