HttpContext

HttpContext

5 Series
18 Lessons
5h 8m

The AdonisJS HttpContext is unique to each request. It contains information about a specific request like the request body, matched route, headers, cookies, the authenticated user, and much more.

Series.

Lessons.

Video preview
Adocasts Plus Exclusive
Free in 7 days
Checking For and Populating an Authenticated User
Let's Learn AdonisJS 6 #7.2
・
Apr 20

Checking For and Populating an Authenticated User

In this lesson, we'll create a silent auth middleware that will automatically check whether a request has an authenticated user attached to it, and populate that user's details if one is found.

Video preview
Adocasts Plus Exclusive
Free in 7 days
Authenticating A Newly Registered User
Let's Learn AdonisJS 6 #7.1
・
Apr 20

Authenticating A Newly Registered User

In this lesson, we'll learn how we can authenticate, or login, a new user who just registered with our application. We'll then see how we can populate the authenticated user's details on subsequent requests.

Video preview
Adocasts Plus Exclusive
Free in 7 days
The Flow of Middleware
Let's Learn AdonisJS 6 #7.0
・
Apr 20

The Flow of Middleware

In this lesson, we'll learn about the middleware that comes preinstalled within AdonisJS and the flow of this middleware during an HTTP Request at both a global and route-specific scale.

Video preview
Adocasts Plus Exclusive
Free in 5 days
AdonisJS 6 Session Authentication in 15 Minutes
AdonisJS in 15 #5.0
・
Apr 18

AdonisJS 6 Session Authentication in 15 Minutes

In this lesson, we'll learn how to add authentication to a new AdonisJS 6 application using the session guard. In these 15 minutes, you'll learn how to register a user, logout a user, verify a user's credentials and log them in, and more.

Video preview
Creating A Login Form and Validator
Let's Learn AdonisJS 6 #6.5
・
Apr 12

Creating A Login Form and Validator

In this lesson, we'll apply what we've learned to create a login page as well as a validator for our login form.

Video preview
Displaying Validation Errors
Let's Learn AdonisJS 6 #6.2
・
Apr 09

Displaying Validation Errors and Validating from our Request

In this lesson, we'll learn how we can display feedback for invalid fields noted by errors from our VineJS validators. We'll also see how we can validate directly from our request using request data.

Video preview
Validating Form Data with VineJS
Let's Learn AdonisJS 6 #6.1
・
Apr 09

Validating Form Data with VineJS

In this lesson, we'll learn how to validate form data using AdonisJS homegrown validation library, VineJS. With VineJS we can easily ensure our request body consists of properties we need, in the types we need them, with valid values.

Video preview
Form Basics and CSRF Protection
Let's Learn AdonisJS 6 #3.8
・
Feb 17

Form Basics and CSRF Protection

In this lesson, we'll cover the basics of working with HTML forms in AdonisJS and how they incorporate Cross-Site Request Forgery (CSRF) protection via AdonisJS Shield.

Video preview
Share vs Global Data Flow
Let's Learn AdonisJS 6 #3.7
・
Feb 17

Share vs Global Data Flow

In this lesson, we'll compare the difference between sharing information with an EdgeJS instance and defining a Global within EdgeJS.

Video preview
State vs Share Data Flow
Let's Learn AdonisJS 6 #3.6
・
Feb 17

State vs Share Data Flow

In this lesson, we'll learn about the difference between passing information directly into EdgeJS' state and sharing information with EdgeJS.

Video preview
Singleton Services and the Idea of Caching
Let's Learn AdonisJS 6 #2.12
・
Jan 31

Singleton Services and the Idea of Caching

In this lesson, we'll learn about singleton services and how to use them as a store to hold temporary information throughout our server's life by building a simple in-memory caching service.

Video preview
Cleaning Up Routes with Controllers
Let's Learn AdonisJS 6 #2.10
・
Jan 31

Cleaning Up Routes with Controllers

In this lesson, we'll learn what controllers are and how they can be used to drastically simplify our route definitions by allowing us to move our route handlers off the route definition and into the controller.

Video preview
Adocasts Plus Exclusive
Exclusive
Location from user IP address
AdonisJS Quick Tip #19.0
・
Nov 03, 23

How To Get City and State Info from User’s IP Address using IP2Location

In this lesson, we'll learn how to get our user's city, region, and country location information using their IP address.

Let's Learn AdonisJS 5 #4.0
・
Feb 05, 22

Service Providers & The IoC Container

We'll learn about Service Providers and how they interact with the IoC Container. We'll then put this to practice by wrapping a NodeJS package so it's easy to use within AdonisJS

Let's Build with AdonisJS #1.3
・
Nov 20, 21

Rebuilding Jagr.Co, Social Auth & Image Management

In this stream, we work on finishing up social authentication using AdonisJS Ally. Then, we'll add project and permission settings and image uploading to Digital Ocean Spaces.

AdonisJS Quick Tip #1.0
・
Nov 03, 21

Getting Data by the User's Timezone with Luxon's DateTime

In this lesson, we'll learn how we can use the user's current time zone to create, update, or query time-sensitive information in AdonisJS using Luxon's DateTime object.

AdonisJS Quick Tip #6.0
・
Oct 27, 21

How To Add A Global Property To Your HttpContext in AdonisJS 5

In this lesson, we'll be covering how we can extend our HttpContext with a new property that we'll populate using a route parameter.

Let's Learn AdonisJS 5 #1.3
・
Sep 04, 21

Understanding the HttpContext

The HttpContext object contains unique information about individual requests our application receives. In this lesson, we'll cover what it is, how it's passed, and how we can mutate it.