2016-12-12 17:35:18 +08:00
---
title: Configure Identity | Microsoft Docs
uid: security/authentication/identity-configuration
---
# Configure Identity
ASP.NET Core Identity has some default behaviors that you can override easily in your application's startup class.
2017-06-30 09:27:56 +08:00
## Passwords policy
2016-12-12 17:35:18 +08:00
2017-06-30 09:27:56 +08:00
By default, Identity requires very secure passwords who have to contain an uppercase character, lowercase character, digits and some other restrictions that you sometimes need to simplify. It's very simple to do that, all the configuration is accessible in the startup class of your application.
2016-12-12 17:35:18 +08:00
2016-12-12 17:44:57 +08:00
[!code-csharp[Main ](identity/sample/src/ASPET-IdentityDemo-PrimaryKeysConfig/Startup.cs?highlight=2&range=60-65 )]
2016-12-12 17:35:18 +08:00
## Application's cookie settings
2017-06-30 09:27:56 +08:00
With the same philosophy of the passwords policy, all the settings about the application's cookie can be changed in the startup class.
2016-12-12 17:35:18 +08:00
2016-12-12 17:44:57 +08:00
[!code-csharp[Main ](identity/sample/src/ASPET-IdentityDemo-PrimaryKeysConfig/Startup.cs?highlight=2&range=72-80 )]
2016-12-12 17:35:18 +08:00
## User's lockout
2017-04-15 01:48:25 +08:00
[!code-csharp[Main ](identity/sample/src/ASPET-IdentityDemo-PrimaryKeysConfig/Startup.cs?highlight=2&range=67-70 )]