An authorization handler evaluates a requirement against the authenticated user's context and can mark that requirement as successful. ASP.NET Core invokes handlers through named authorization policies, allowing controller actions to require different access rules. section 9.6
OnlyMe policy
The OnlyMe policy requires authentication and adds OnlyMeRequirement. Its handler succeeds only when the preferred_username claim matches the permitted email. It deliberately does not mark the requirement as failed otherwise, because another handler may still satisfy it; explicit failure is reserved for rules that must reject the requirement. A hardcoded email demonstrates the mechanism but is unsuitable for production, where the allowed list and verified identity claim should come from a safe source. section 9.6

