Yes exactly, so Claims ?!
Consider claims to be something very distinctly different to the ASP.Net Identity framework implementation you can choose to get in your default projects and which includes the tables you ask about.
Sure identify framework generates tables to handle such but is ultimately it is not all what it is about, the whole claim ting, or the token thing, which is when claims become interesting - it is just an implementation of it, another could be be for instance often be a Json Web token (JWT) used as a bearer token with a REST API, whichever what do you get in either case?
You get a lump of data encrypted and tamper free because it has gotten proof of content from your own server and that carries with and you have a (key, valuebag) type data that will morf to be a (key, value) if you only ever supplied one.
Then asp.net support Policies, which basically enable you to say that this policy requires that said lump of data contains the followingn ... and this can then be used on methods and controllers.
also programmatically you can easily access these claims, so when requests come in from authenticated user to api, any of the api instances presume you have a load balanced setup with many, and the request carry already stuff like userid, some controller or ui meaning_full_name with values ["view", "edit", "add", ... ] e.g.
Bearer tokens with claims is really a way that you can avoid having to authenticate and authorize each request and you can both immediately expire tokens if you wish and let them last as long as you like, really useful especially to web applicaitions if you go for the JWT version because accessing same in ui is pretty streight forward in all web MVVM frameworks like Angular, React, .. etc
Tokens decrypting into Json being litterally in javascript the original JavaScriptObjectNotation a first class citizen object ... is just super easy to work with as opposed to anything which is not. And any programming language deserialize json these days so you can quickly populate a model.
So claims solve several things:
- Authenticate and authorize requests for the backend
- Deliver permission set (if used like that) and activation deactivation of features/ parts to ui
- Release getting qualification for whatever really outside of login/ token generation flow
- An easy way to revoke privileges
then what can you put in claims? anyting! you could serialize an object into a value as long as you base 64 encode or similar, if you like but mostly you shouldn't.
Why is that you want to support the object part of a JavaScript object, the JSO in Json as it were so what we have is that each claim is in essence going to be a member property which can be a single value or an array and always only strings to ensure maximum compliance between tiers. obviously you can put anything in a string and treat it accordingly when reading to and from but for efficiency the important takehome is that it is a flat structure not a nested hierachy a list of (key,value) where value is a bit special depending on if there are zero, 1 or seeral values
I bet it will grow on You,
and for convenience you can feed such from included database if you scaffold something with that in the new project guide in VS and get a lot of handling for free so to say, and why shouldn't you, beyond having to contend with a lot of code you didn't write yourself - Often this easy way is taken and then that means you will prepare for the next assignment which could be structured in the very same way :)