Skip to main content

Module layer

Module layer 

Source
Expand description

Server-side JWT validation layer for tonic gRPC services.

Defines two types and one constructor:

On successful validation, KeycloakClaims are inserted into the request’s extensions so handler methods can retrieve them via request.extensions().get::<KeycloakClaims>(). On failure the request is rejected with [tonic::Code::Unauthenticated] before reaching any handler.

Structs§

JwtValidationService
The server-side interceptor that validates Authorization: Bearer <token> on every incoming gRPC request.

Functions§

validator_into_layer

Type Aliases§

JwtValidationLayer
An [InterceptorLayer] that installs JWT validation on a tonic server.