Interface IHttpTokenValidator

Namespace: redb.Route.Http
Assembly: redb.Route.Http.dll

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

Methods

ValidateAsync(string, CancellationToken)

The principal the token stands for, or null when the token is not accepted (the caller gets 401 with

Task<ClaimsPrincipal?> ValidateAsync(string token, CancellationToken ct)