All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.src.webhookutils.index.d.ts Maven / Gradle / Ivy

The newest version!
type Props = {
    /**
     * The signing secret associated with the webhook
     */
    signingSecret: string;
    /**
     * The 'momento-signature' header passed with the request
     */
    signature: string;
    /**
     * The stringified body of the request
     */
    body: string;
};
export declare enum RequestValidation {
    VALID = "valid",
    INVALID = "invalid"
}
/**
 * This function is a helper function that can be used to validate that webhook
 * requests are coming from Momento. It is best practice to validate incoming
 * request to a public webhook endpoint
 * @param props {Props}
 */
export declare const validateWebhookRequest: (props: Props) => RequestValidation;
export {};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy