Expand description
Injection seam for closed-side authentication.
The OSS http-server keeps no JWT/cookie/API-key state — those moved
to the closed cognee-http-cloud crate alongside the auth router
family. To let closed embedders plug their auth chain back into the
OSS AuthenticatedUser extractor, OSS stores an optional
Arc<dyn AuthResolver> on AppState.
AuthResolver::resolveis the full chain (Bearer → cookie → API key → optionalExtraAuthValidatorhook). ReturnsSome(user)if any method succeeds, elseNoneso the extractor can fall through to the default-user path (or 401 whenrequire_authentication=true).ExtraAuthValidatoris the narrower Auth0/OIDC-only hook the plan names explicitly. A closed embedder that only wants to add an Auth0 hook (and not replace the whole chain) installs only this — the OSSRouterBuilder::with_extra_validator(...)wraps it in a default resolver that calls just the validator.
Traits§
Functions§
- resolver_
from_ validator - Wrap an
ExtraAuthValidatorinto anAuthResolverthat performs only the validator step.