Files
training-software/certificates/urls.py
Paperclip CTO 4f7232db56
Some checks failed
CI / Tests (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / OpenAPI Schema (push) Has been cancelled
feat(TRA-243): public certificate verification endpoint with hash integrity check
- CertificateVerifyView: GET /certificates/verify/{serial}/ — AllowAny
- Re-computes SHA-256 from stored PDF and compares to archived hash
- Returns {valid, serial_number, course_title, issued_at, hash} — no PII
- Returns 404 for non-completed or non-existent certificates
- 7 integration tests: hash match, tampered hash, missing file, PII exclusion, 404 cases

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-07 09:24:05 +02:00

12 lines
406 B
Python

from django.urls import path
from .views import CertificateDetailView, CertificateVerifyView, MyCertificatesView
app_name = "certificates"
urlpatterns = [
path("", MyCertificatesView.as_view(), name="my-certificates"),
path("<uuid:cert_id>/", CertificateDetailView.as_view(), name="certificate-detail"),
path("verify/<str:serial_number>/", CertificateVerifyView.as_view(), name="verify"),
]