Set gRPC response headers


I am building an authentication service using akka grpc and I need to be able to set a token as a response header. With the generated gRPC API, there does not seem to be anywhere I can hook into to achieve this.

Is there any way I can add response headers using an akka gRPC service?

Thanks for such a great open source product

This depends a little on what the API’s look like exactly. If it’s a ‘cookie-like’ token that you return once on a ‘special’ login call, it might make sense to use a regular Akka HTTP route for that. I made a quick mockup of what such an approach might look like at (I wrote it in a verbose style to make it clearer what’s going on).

Is what you had in mind similar to this set-up, or is your situation different?