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:
@slackSig
@http(method: "POST", uri: "/slack/event")
operation SlackEvent {
input: SlackEventInput
}
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.