Jeff Sheltren: Building An API With Django 2.0: Part II

Introduction This is the second-part of a series. In the previous entry we used Django 2.0 to build a simple REST API for registering users and managing their logins. To satisfy requirements we managed authentication with client-side sessions, using JSON Web Tokens. In this blog we’re going to build upon what we started previously by adding two-factor authentication. We’ll learn more about what that means and how it works. We’ll leverage the Django OTP library to fully support TOTP devices, also offering emergency codes for when users lose their phones. And during this process we’ll learn much more about how JSON Web Tokens work, building a custom payload to support a second level of authentication. You can follow along and write out the code yourself, or view it online at the following URL . Part I: Powering A Single Page App Part II: One-Time Passwords Part III: Unit Testing (Coming Soon) Two-Factor Authentication Two-factor authentication aims to improve the security of user logins by requiring two methods of proving a user’s identity. In our example, the first method is a password. The second method we’ll use is TOTP. TOTP TOTP stands for Time-based One-Time Password. It’s a fairly simple algorithm… Read more

Mon, 01/29/2018 – 02:59

Source From:
Original article title: Jeff Sheltren: Building An API With Django 2.0: Part II.
This full article can be read at: Jeff Sheltren: Building An API With Django 2.0: Part II.


Random Article You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *