Update links to sample app (#10521)
parent
38d8db2b1e
commit
f99a209428
|
@ -4,7 +4,7 @@ author: mjrousos
|
|||
description: Learn how to use a custom IAuthorizationPolicyProvider in an ASP.NET Core app to dynamically generate authorization policies.
|
||||
ms.author: riande
|
||||
ms.custom: mvc
|
||||
ms.date: 05/02/2018
|
||||
ms.date: 01/21/2019
|
||||
uid: security/authorization/iauthorizationpolicyprovider
|
||||
---
|
||||
# Custom Authorization Policy Providers using IAuthorizationPolicyProvider in ASP.NET Core
|
||||
|
@ -19,8 +19,7 @@ Examples of scenarios where a custom [IAuthorizationPolicyProvider](/dotnet/api/
|
|||
* Using a large range of policies (for different room numbers or ages, for example), so it doesn’t make sense to add each individual authorization policy with an `AuthorizationOptions.AddPolicy` call.
|
||||
* Creating policies at runtime based on information in an external data source (like a database) or determining authorization requirements dynamically through another mechanism.
|
||||
|
||||
[View or download sample code](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/AuthSamples/) from the [AspNetCore GitHub repository](https://github.com/aspnet/AspNetCore). Download the aspnet/AuthSamples repository ZIP file.
|
||||
Unzip the *AuthSamples-master.zip* file. Navigate to the *samples/CustomPolicyProvider* project folder.
|
||||
[View or download sample code](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/CustomPolicyProvider) from the [AspNetCore GitHub repository](https://github.com/aspnet/AspNetCore). Download the aspnet/AspNetCore repository ZIP file. Unzip the file. Navigate to the *src/Security/samples/CustomPolicyProvider* project folder.
|
||||
|
||||
## Customize policy retrieval
|
||||
|
||||
|
@ -149,4 +148,4 @@ To use custom policies from an `IAuthorizationPolicyProvider`, you must:
|
|||
services.AddSingleton<IAuthorizationPolicyProvider, MinimumAgePolicyProvider>();
|
||||
```
|
||||
|
||||
A complete custom `IAuthorizationPolicyProvider` sample is available in the [aspnet/AuthSamples GitHub repository](https://github.com/aspnet/AuthSamples/tree/master/samples/CustomPolicyProvider).
|
||||
A complete custom `IAuthorizationPolicyProvider` sample is available in the [aspnet/AuthSamples GitHub repository](https://github.com/aspnet/AspNetCore/tree/release/2.2/src/Security/samples/CustomPolicyProvider).
|
||||
|
|
Loading…
Reference in New Issue