You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having access to this information at runtime would allow building a interceptor that can generically authorize the request before build called
Proposal
Add option values to request.
This should probably be hidden behind a option in the Builder. ideally this could also include whitelisting options. (example to not include googles grpc http transcoding annotations)
tonic-build has no issue with building this example with annotations.rs being a empty file and policy.rs containing just 1 struct for the message
edit: originally I said the values should be added into metadata but that wouldn't make sense as metadata is for binary and ascii data. after looking around this request also seems related to #255 as the values would have to be stored in something like anymap or http::extentions
The text was updated successfully, but these errors were encountered:
Feature Request
Crates
tonic-build
Motivation
the option field in methods can be used to access contextual information. an example of this would required permissions
Having access to this information at runtime would allow building a interceptor that can generically authorize the request before build called
Proposal
Add option values to request.
prost seems to already support getting option values for methods via the options.uninterpreted_option
some potential issues may be dealing with multiple files and tracking imports. with the example above there is 3 files used
the
annotations.proto
just defines the MethodData whilepolicy.proto
contains the messagetonic-build has no issue with building this example with
annotations.rs
being a empty file andpolicy.rs
containing just 1 struct for the messageedit: originally I said the values should be added into metadata but that wouldn't make sense as metadata is for binary and ascii data. after looking around this request also seems related to #255 as the values would have to be stored in something like
anymap
orhttp::extentions
The text was updated successfully, but these errors were encountered: