Core namespace containing functions to handle bytes, encodings and Discord authentication
Core namespace containing functions to handle bytes, encodings and Discord authentication
(wrap-authenticate handler public-key)
Ring middleware to authenticate incoming requests according to the Discord specification.
This means:
signature-header
and timestamp-header
from the headershandler
with a restored bodyThe public-key
is the public key of the corresponding Discord app. It may be given as a String or byte array.
This middleware must be in the hierarchy before the body is processed.
This middleware supports both synchronous and asynchronous handlers.
Ring middleware to authenticate incoming requests according to the Discord specification. This means: - If request method is not POST, respond with status 405 (Method Not Allowed) - Get body from the request as well as [[signature-header]] and [[timestamp-header]] from the headers - If any of the above is not present, respond with status 400 (Bad Request) - Check the parameters for authenticity as defined by Discord - If authentic, delegate to the `handler` with a restored body - If not authentic, respond with status 401 (Unauthorized) The `public-key` is the public key of the corresponding Discord app. It may be given as a String or byte array. This middleware must be in the hierarchy **before** the body is processed. This middleware supports both synchronous and asynchronous handlers.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close