Skip to content

v0.0.10

Latest

Choose a tag to compare

@alessandroargentieri alessandroargentieri released this 03 Feb 11:40
v0.0.10
55718f5

Fix: Streaming Auth Context Propagation

This release fixes a bug where the streaming auth interceptor (grpcStreamAuthInterceptor) was discarding the enriched context returned by authFunc. This prevented downstream interceptors from accessing auth claims (e.g., grant type).

Changes

  • Add wrappedServerStream type to override Context() method
  • Fix grpcStreamAuthInterceptor to use the enriched context from authFunc
  • Add comprehensive tests for streaming auth context propagation

Why This Matters

This fix enables grant type validation to work correctly for streaming endpoints. Previously, ClaimsFromContext(ctx) would return nil in streaming handlers, causing grant type checks to be skipped.

Migration

No breaking changes. Simply update your dependency:

```bash
go get github.com/gyozatech/grpckit@v0.0.10
```