2016-12-12 17:35:18 +08:00
---
2017-07-01 07:47:15 +08:00
title: Configure Identity
2016-12-12 17:35:18 +08:00
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-07-04 01:46:58 +08:00
By default, Identity requires that passwords contain an uppercase character, lowercase character, and digits. There are also some other restrictions. If you want to simplify password restrictions, you can do that 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-07-04 01:46:58 +08:00
Like the passwords policy, all the settings of 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 )]