Authentication and Authorization in ASP.NET Core 6 Web API

https://www.pluralsight.com/courses/asp-dot-net-core-6-web-api-authentication-authorization

by Roland Guijt


Mod 1: Course Overview

  1. Course Overview

Mod 2: API Authentication with Keys and Cookies

  1. The Starting Situation
  2. Key Protection with Middleware
    • a rudimentary way of protecting a webapi; use a middleware to check for api key in header (not recommended by author) 
    • to be able to use security headers in swagger, you have to configure it in code. use the OpenApiSecurityRequirement object
  3. Key Protection with an Attribute
    • the solution from previous clip can be implemented as an attribute
    • if an attribute requires dependency injection, attribute will need to be used like this: [TypeFilter(typeof(ApiKeyAttribute))]
  4. Cookie Authentication
  5. Configuring Cookies and Schemes
  6. Restricting Access with the Authorize Attribute
  7. Accessing User Information

Mod 3: Protecting APIs with Tokens

  1. OAuth2 and the Identity Provider
    • tokens for APIs are called access token; for front ends, it is called identity token
  2. Protecting an API Using Access Tokens
    • audience is a microsoft invention, it is not part of OAuth
  3. Setting up an Identity Provider with Duende IdentityServer
  4. Scopes and Clients
  5. Requesting and Sending Access Tokens
  6. Using a Filter to Fetch and Include Access Tokens
    • use case for a ServiceFilter
  7. Automatic Token Management
  8. Anatomy of an Access Token
  9. Reference Tokens
Mod 4: Using Front-ends to Obtain Tokens

  1. OpenID Connect and the Authorization Code Flow
  2. Applying Authorization Code Flow
  3. Accessing and Using the Access Token
  4. Refresh Tokens and Token Management
  5. Adding Claims to the Access Token
Mod 5: Adding Authorization
  1. Checking Audience
  2. ClaimsPrincipal and Claims Mapping
  3. Authorization Policies
  4. Global Policies
  5. Deciding on an Authorization Strategy
  6. The Authorization API
  7. Requirements and Handlers

Comments

Popular posts from this blog

Angular Routing and Navigation Playbook

Working with Files in C# 10

Mastering Git