Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Asp.net Core 2.1 Identity's LockoutEnabled property actually for?

I'm using Asp.net Core 2.1 Identity and there is a property named "LockoutEnabled", for a second I thought this flag determines whether a user is locked out or not.  But the doc says it is

"a flag indicating if the user could be locked out"

So what is this property for?  And is the lock out feature actually implemented in this version of the library?  Thanks.

like image 872
Ray Avatar asked Sep 11 '18 17:09

Ray


People also ask

What is Aspnet core identity used for?

ASP.NET Core Identity: Is an API that supports user interface (UI) login functionality. Manages users, passwords, profile data, roles, claims, tokens, email confirmation, and more.

What is security stamp in asp net identity?

The security stamp is a Guid stored in the database against the user. It gets updated when certain actions take place within the Identity UserManager class and provides a way to invalidate old tokens when an account has changed.


1 Answers

It is used to enable a user lockout for a specific period of time.
If you set LockoutEnabled to true and add a LockoutEnd date, you'll prevent that user from logging in again until after the LockoutEnd date is reached.
If only the LockoutEnabled flag is set to true, with no LockoutEnd date set, it just means that the user can be locked out, but is not locked out.

like image 57
Vitor M. Barbosa Avatar answered Sep 28 '22 08:09

Vitor M. Barbosa