From ec9aafa167b06315059fd9cdd2f5001e666ac84c Mon Sep 17 00:00:00 2001 From: GitHubPang <61439577+GitHubPang@users.noreply.github.com> Date: Wed, 30 Jun 2021 18:24:51 +0800 Subject: [PATCH] Fix link formatting in policies.md (#22634) --- aspnetcore/security/authorization/policies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/security/authorization/policies.md b/aspnetcore/security/authorization/policies.md index 2a0fe29438..4351e85b31 100644 --- a/aspnetcore/security/authorization/policies.md +++ b/aspnetcore/security/authorization/policies.md @@ -171,7 +171,7 @@ Handlers are registered in the services collection during configuration. For exa The preceding code registers `MinimumAgeHandler` as a singleton by invoking `services.AddSingleton();`. Handlers can be registered using any of the built-in [service lifetimes](xref:fundamentals/dependency-injection#service-lifetimes). -It's possible to bundle both a requirement and a handler in a single class implementing both and /dotnet/api/microsoft.aspnetcore.authorization.iauthorizationhandler. This creates a tight coupling between the handler and requirement and is only recommended for simple requirements and handlers. Creating a class which implements both interfaces removes the need to register the handler in DI due to the built-in [PassThroughtAuthorizationHandler](https://github.com/dotnet/aspnetcore/blob/v5.0.7/src/Security/Authorization/Core/src/PassThroughAuthorizationHandler.cs) that allows requirements to handle themselves. +It's possible to bundle both a requirement and a handler in a single class implementing both and . This creates a tight coupling between the handler and requirement and is only recommended for simple requirements and handlers. Creating a class which implements both interfaces removes the need to register the handler in DI due to the built-in [PassThroughtAuthorizationHandler](https://github.com/dotnet/aspnetcore/blob/v5.0.7/src/Security/Authorization/Core/src/PassThroughAuthorizationHandler.cs) that allows requirements to handle themselves. See the [AssertionRequirement class](https://github.com/dotnet/aspnetcore/blob/52eff90fbcfca39b7eb58baad597df6a99a542b0/src/Security/Authorization/Core/src/AssertionRequirement.cs#L13) for a good example where the `AssertionRequirement` is both a requirement and the handler in a fully self contained class.