Skip to content

Asynchronous interceptor #870

Closed
Closed
@thekeenant

Description

@thekeenant

I'm working with Tonic (+tokio) trying to introduce authentication/authorization for my gRPC server. I can see a simple example of this here. However, I think auth would typically involve dispatching some additional request (e.g. http, rpc, or some database request) to make the decision to return Ok or Err (to check db for presence of some token, or username/password, etc.)

Is it possible to call such an async function from a Tonic interceptor? Or maybe it's necessary to use Tower to accomplish this and if that's the case, any plans to make regular Tonic interceptors async capable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions