Authentication and authorization — proving identity and granting access
This chapter explains the difference between authentication and authorization from the angles of ordering, status codes for failure, and where implementation lives. It covers the three authentication factors, how to carry authentication state via sessions vs. tokens, authorization models like RBAC, and how to structure a written answer.
Authentication and Authorization Design — JWT and the Division of Responsibilities Across Layers
Explains the design of authentication and authorization in DDD and clean architecture. Covers the division of responsibilities where authentication and authorization live in the presentation layer and business rules in the domain layer, the structure of JWT, the implementation with Laravel × tymon/jwt-auth, access/refresh tokens, and role-based authorization.
Chapter 15: Designing an Authentication and Authorization System — Passwords, Sessions, MFA, and Audit Logs
This chapter covers, for junior engineers and from a database-design angle, the difference between authentication and authorization, password hashing (bcrypt/argon2), session management, multi-factor authentication (MFA / TOTP), account lockout (OWASP/NIST compliant), and audit logs.