(check-solution payload hmac-key check-expiration?)
Verifies the solution received from the client, returning
an explicit true
or a falsy nil
Params:
payload
: the map of the following keys received from the client.
Note that usually you'll get the solution encoded in base-64
algorithm
challenge
- the solved challenge valuenumber
- the random number generated previouslysalt
signature
hmac-key
- the HMAC key used for verification.check-expiration?
- whether to check if the challenge has not expired.
Recommended to be kept as trueVerifies the solution received from the client, returning an explicit `true` or a falsy `nil` Params: - `payload`: the map of the following keys received from the client. Note that usually you'll get the solution encoded in base-64 - `algorithm` - `challenge` - the solved challenge value - `number` - the random number generated previously - `salt` - `signature` - `hmac-key` - the HMAC key used for verification. - `check-expiration?` - whether to check if the challenge has not expired. Recommended to be kept as true
(check-solution-base64 b64-payload hmac-key check-expiration?)
Verifies a base64 encoded solution
Verifies a base64 encoded solution
(verify-fields-hash form-data fields fields-hash algorithm)
Verify the hashes of field values in the input map. Useful for scraper protection
Verify the hashes of field values in the input map. Useful for scraper protection
(verify-server-signature {:keys [algorithm verification-data signature verified]
:as payload}
hmac-key)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close