liveBook · Manning

Business-logic check

As explained in ASP.NET Core in Action, 3e

A business-logic check is an authorization decision performed directly within application or domain logic rather than through a framework authorization infrastructure.

A business-logic check makes an authorization decision directly inside domain or application logic instead of relying on framework authorization infrastructure. This keeps the domain simpler, easier to test, and framework-independent. section 24.5.2

Choose this approach with its tradeoffs in mind:

  • Prefer direct domain checks when keeping authorization simple and independent of ASP.NET Core is more important than framework features. section 24.5.2
  • Recognize that framework authorization provides declarative policies and easier access to request-related services and properties. section 24.5.2
  • Use both approaches when application design calls for framework protection at the endpoint and business rules inside the domain. section 24.5.2

How ASP.NET Core in Action, 3e covers it

How deep it goes
Compares simplicity and testability with declarative policies, peripheral services, and infrastructure costs without prescribing one universal choice.
What you can do after
Evaluate authorization designs by weighing framework independence and testability against declarative policies and request-aware services.
How it connects
Connects domain services with resource-based authorization, the Authorize attribute, IAuthorizationService, and declarative policies.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.