ArturRios.Util.WebApi
ASP.NET Core plumbing — startup, token authentication, middleware, typed HTTP clients and response resolution.
Where the family comes together for a service: it bootstraps the host with
ArturRios.Configuration, authenticates with ArturRios.Jwt, and turns
ArturRios.Output envelopes into ActionResults.
What you get
| Area | What it does |
|---|---|
| Configuration / bootstrap | WebApiStartup wires configuration loading, Swagger and the middleware pipeline behind a small set of virtual hooks; WebApiParameters parses command-line startup args. Docs |
| Security | AuthenticationMiddleware reads a token from the header, a cookie, or either; validates it as the app’s own JWT and/or a Google ID token; and attaches an IAuthenticatedUser in stateless (ClaimsOnly) or per-request-revalidated mode. [Authorize], [AllowAnonymous] and [RoleRequirement(...)] declare access rules. Docs |
| Middleware & diagnostics | ExceptionMiddleware turns unhandled exceptions into a JSON error envelope; TraceActivityMiddleware and TracePropagationHandler propagate a W3C traceparent across a request and its outgoing calls. Docs |
| HTTP client | BaseWebApiClient / BaseWebApiClientRoute give a typed client a shared HttpGateway, route grouping, and helpers to authenticate and carry the resulting bearer token on later calls. Docs |
| Responses | ResponseResolver.Resolve(...) wraps DataOutput<T>, PaginatedOutput<T> and ProcessOutput in an ActionResult, defaulting to 200/400 on Success unless a status code is supplied. Docs |
Install
dotnet add package ArturRios.Util.WebApi
Family dependencies
ArturRios.Configuration2.0.0ArturRios.Jwt1.4.1ArturRios.Util2.2.0
…and transitively ArturRios.Extensions, ArturRios.Output.
Third-party: FluentValidation, Google.Apis.Auth, Swashbuckle.