# Securing the Web API

Securing the Web API: Insomnia: Signing In and Sending a Token, Securing a Web API with JWT Bearer.

Updated: November 18, 2026

1. [Insomnia: Signing In and Sending a Token](https://www.ask-codey.com/lessons/securing-the-web-api-insomnia-sign-in-and-tokens) (Journeyman): Before you secure the categories API, save the requests a signed-in client sends in Insomnia, register, log in, and send the token from the login's answer as a Bearer token, and see that today the API lets anyone in.
2. [Securing a Web API with JWT Bearer](https://www.ask-codey.com/lessons/securing-the-web-api-securing-a-web-api-with-jwt-bearer) (Journeyman): Give the categories API users. Register and login endpoints check passwords with PasswordHasher and hand back a signed JSON Web Token; AddJwtBearer checks the token on every request, and \[Authorize\] with roles decides who may add, change and delete. The signing key lives in user secrets.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/securing-the-web-api
