pub fn router_with_auth(
state: SoloHttpState,
bearer_token: Option<String>,
) -> RouterExpand description
Build the router with optional bearer-token auth (v0.7.x legacy shape).
When bearer_token is Some(t), every request except GET /health
GET /openapi.json(unauthenticated probes / machine-readable spec) requiresAuthorization: Bearer t. v0.8.0 P3 routes this through the newAuthValidator::Bearermiddleware so anAuthenticatedPrincipalis attached to every authenticated request (theTenantExtractorreadsprincipal.tenant_claimahead of theX-Solo-Tenantheader).