/DNC-Authentication

Dot Net Core Authentication: Repo used for learning and code snippets

Primary LanguageC#

Dot Net Core - Authentication

This repository is beeing worked on, and currently displays faulty information

ROLES VS CLAIMS VS POLICY

ROLES

img

  • A user is either in it or not
    • kind of like booleans
  • One user can have many roles
  • Encapsulating
    • user
    • functions
  • You can use roles to enforce policies

FOLDER: Roles -> Controllers -> RolesController

Claims

img 1 img 2

  • Is a key value pair (img 1)
  • Describes a user
    • Is a user property
  • A claim belongs to a user
    • A user can have many claims (img 2)

Policies

img 3

  • Is an authorization function
  • You can use roles to enforce policies

FOLDER: Roles -> Controllers -> PoliciesController

Sources

rawcoding rawcoding github