W
W
WhiteNinja2016-10-20 10:49:11
ASP.NET
WhiteNinja, 2016-10-20 10:49:11

Use OWIN Claims or Sessions in ASP.NET MVC to store user data?

Good day!
After reading about OWIN and its use in terms of user authorization using cookies in an ASP.NET MVC 5 project, I still have a question about storing user data in the session / brands.
It turns out that if only authorized users (some kind of CRM system) have access to the application, then all data during the work of an already authorized user can be recorded in Claims, which in turn are recorded in cookies? And for this it is not necessary to use the Sessions mechanism at all?
But if, for example, the application is an online store, and the application can be used by unauthorized users, for example, the formation of a shopping cart, then you need to use Sessions, or can you also write data from the generated shopping cart to Claims (cookies) ?
Will it be normal that I will not keep records of sessions in the database, i.e. I will only have Users, Roles etc tables, but there will be no possible Sessions table?
These questions are related to the fact that earlier the main projects were carried out by me in PHP, and in most cases the session mechanism was used through the database, so I am now in some uncertainty.
A huge request to help understand the details of authorization / session in ASP.NET.
Thanks for any help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2016-10-20
@yarosroman

Claims are meant for something completely different. To store user data, you can use local storage, such as.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question