liveBook · Manning

Authentication

As explained in Rust Servers, Services, and Apps

Authentication is the process of verifying the identity of a client or user before granting access to protected functionality.

Authentication verifies a user's identity before access to protected functionality. In the tutor application, users submit a username and password through a sign-in form. section 1.3.2 section 9.1

A tutor sign-in request follows this path:

  • The form sends a POST request to the Actix Web server. section 9.1
  • A handler looks up the user record in the local database and checks the submitted password against the stored password hash using Argon2. section 9.3
  • On failure, the form is shown again with an error; on success, the user proceeds to the application. section 9.1

Testing sign-in

Submit a correct username and password, then retry with a wrong password and an invalid username to check the success and error paths. section 9.3

Figure 9.2 Tutor sign-in flow

The sign-in flow diagram shows the request and authentication path. section 9.1

How Rust Servers, Services, and Apps covers it

How deep it goes
Implements credential lookup and password verification, while leaving JWT mechanics and infrastructure security outside the demonstrated sign-in flow.
Examples
Uses a tutor sign-in form, local user records, Argon2 password checks, and tests with correct and incorrect credentials.
What it assumes
Assumes a web application with registered user credentials stored in a local database; does not teach infrastructure or network security.
What you can do after
Apply it via Actix Web to handle tutor sign-in requests and distinguish successful credentials from failed attempts.
How it connects
Connects password hashing, HTTP requests, database access, and web request handlers.

Also explained in

Compare how 34 books explain authentication →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Rust Servers, Services, and Apps. The section links point to the parts of the book it draws on.