انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-037-L05

عرض عملي: التسجيل مع تجزئة كلمات المرور والتقييد

  • الدرس 5 من 5
  • Junior
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

build registration and a safe login. Prepares JNR-037-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Add the encoder bean and a POST /api/auth/register endpoint with validation (length, email format).
  2. Hash the password in the service; store only the hash.
  3. Return the same response whether or not the email already exists (or a generic message).
  4. Add a simple in-memory throttle: 5 failures per account and IP, then 429 for a period.
  5. Planned mistake: logging the whole request body, which prints the password. Fix: log only the email and mask or skip bodies.
  6. Search logs and database for any plaintext password.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.