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
Daniel
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 https://github.com/akka/akka-grpc/pull/544/files#diff-defcdcc87e5fc4bade0cf5cddc94fc78R64 (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?