Skip to content
Ameen Abozaid
Planned lessonJNR-037-L05

Demo: registration with password hashing and throttling

  • Lesson 5 of 5
  • Junior
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

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

Draft outline details

Step by step

  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.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.