Replies: 1 comment
-
smithy-rs doesn't have such a general mechanism to pre-apply a middleware based on a trait in the Smithy data model. We do plan on supporting such a mechanism, but the author of the Smithy trait will have to provide a small code-generation component: essentially, they will have to fill one of these out: Iin your mind, how did you envision the code generator to generate such a Rust trait just from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am very new to Smithy and want to create a service that will receive requests from Slack.
Slack supports request verifying: https://api.slack.com/authentication/verifying-requests-from-slack.
In short, it needs 2 values from HTTP header, plus the whole HTTP body, as input, to calculate the signature.
I wonder is it possible to define this as some sort of Smithy trait. So I can have something like:
Then the Rust code generator generates some Rust
trait
that I could implement, to have the actual Slack signature verifying logic. In the end, an instance of the verifier is created and attached to the service.Beta Was this translation helpful? Give feedback.
All reactions