Path: redb-route/redb.Route.Http/IHttpTokenValidator.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Http/IHttpTokenValidator.cs ---- using System.Security.Claims; namespace redb.Route.Http; /// /// Checks the bearer token of an inbound request for an http: consumer or a REST declaration with /// inboundAuth=bearer, registered in the route registry and named by tokenValidator=#name. /// /// The connector does not read tokens itself: JWT parsing, signing keys and their rotation, audiences and scopes belong /// to the identity provider's library (redb.Identity, or any OpenID Connect client). This interface is where it plugs in. /// /// public interface IHttpTokenValidator { /// /// The principal the token stands for, or null when the token is not accepted (the caller gets 401 with /// error="invalid_token"). A principal whose identity is not authenticated counts as not accepted. An exception /// is a failure of the validator, not of the caller, and answers 500. /// /// The token after Bearer , as the client sent it. /// Cancelled when the request is aborted. Task ValidateAsync(string token, CancellationToken ct); }