commit
c94adeebba
|
@ -46,7 +46,7 @@ Configuration consists of a hierarchical list of name-value pairs in which the n
|
|||
Console.WriteLine($"option1 = {Configuration["subsection:suboption1"]}");
|
||||
```
|
||||
|
||||
To work with arrays in JSON-formatted configuration sources, use a array index as part of the colon-separated string. The following example gets the name of the first item in the preceding `wizards` array:
|
||||
To work with arrays in JSON-formatted configuration sources, use an array index as part of the colon-separated string. The following example gets the name of the first item in the preceding `wizards` array:
|
||||
|
||||
```csharp
|
||||
Console.Write($"{Configuration["wizards:0:Name"]}, ");
|
||||
|
|
|
@ -18,7 +18,7 @@ ASP.NET Core Identity has some default behaviors that you can override easily in
|
|||
|
||||
## Passwords policy
|
||||
|
||||
By default, Identity requires that passwords contain an uppercase character, lowercase character, a digit, and an alphanumeric character. There are also some other restrictions. If you want to simplify password restrictions, you can do that in the `Startup` class of your application.
|
||||
By default, Identity requires that passwords contain an uppercase character, lowercase character, a digit, and a non-alphanumeric character. There are also some other restrictions. If you want to simplify password restrictions, you can do that in the `Startup` class of your application.
|
||||
|
||||
# [ASP.NET Core 2.x](#tab/aspnetcore2x)
|
||||
|
||||
|
|
|
@ -119,4 +119,4 @@ public class SalaryController : Controller
|
|||
|
||||
In the above example any identity which fulfills the `EmployeeOnly` policy can access the `Payslip` action as that policy is enforced on the controller. However in order to call the `UpdateSalary` action the identity must fulfill *both* the `EmployeeOnly` policy and the `HumanResources` policy.
|
||||
|
||||
If you want more complicated policies, such as taking a date of birth claim, calculating an age from it then checking the age is 21 or older then you need to write [custom policy handlers](policies.md#security-authorization-policies-based).
|
||||
If you want more complicated policies, such as taking a date of birth claim, calculating an age from it then checking the age is 21 or older then you need to write [custom policy handlers](policies.md).
|
||||
|
|
|
@ -22,7 +22,7 @@ Authorization is orthogonal and independent from authentication, which is the pr
|
|||
|
||||
## Authorization Types
|
||||
|
||||
ASP.NET Core authorization provides a simple declarative [role](roles.md#security-authorization-role-based) and a [rich policy based](policies.md#security-authorization-policies-based) model. Authorization is expressed in requirements, and handlers evaluate a user's claims against requirements. Imperative checks can be based on simple policies or policies which evaluate both the user identity and properties of the resource that the user is attempting to access.
|
||||
ASP.NET Core authorization provides a simple declarative [role](roles.md) and a [rich policy based](policies.md) model. Authorization is expressed in requirements, and handlers evaluate a user's claims against requirements. Imperative checks can be based on simple policies or policies which evaluate both the user identity and properties of the resource that the user is attempting to access.
|
||||
|
||||
## Namespaces
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ In the preceding code, only the handler with the "Bearer" scheme runs. Any cooki
|
|||
|
||||
## Selecting the scheme with policies
|
||||
|
||||
If you prefer to specify the desired schemes in [policy](xref:security/authorization/policies#security-authorization-policies-based), you can set the `AuthenticationSchemes` collection when adding your policy:
|
||||
If you prefer to specify the desired schemes in [policy](xref:security/authorization/policies), you can set the `AuthenticationSchemes` collection when adding your policy:
|
||||
|
||||
```csharp
|
||||
services.AddAuthorization(options =>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Authenticated encryption details.
|
||||
title: Authenticated encryption details
|
||||
author: rick-anderson
|
||||
description:
|
||||
keywords: ASP.NET Core,
|
||||
|
@ -12,7 +12,7 @@ ms.technology: aspnet
|
|||
ms.prod: asp.net-core
|
||||
uid: security/data-protection/implementation/authenticated-encryption-details
|
||||
---
|
||||
# Authenticated encryption details.
|
||||
# Authenticated encryption details
|
||||
|
||||
<a name="data-protection-implementation-authenticated-encryption-details"></a>
|
||||
|
||||
|
|
Loading…
Reference in New Issue