ProcaWeb.Resolvers.Captcha (proca v3.0.2)

Absinthe middleware to check if captcha code is provided with request. Captcha should be provided in extension: captcha: key

Use: middleware Captcha

middleware Captcha, defer: true - if you want to verify the captcha inside processing.

Link to this section Summary

Functions

Make sure the captcha extension is provided for the request.

If the hcaptcha or procaptcha is configured for the instance, verify the captcha. Otherwise, noop.

Link to this section Functions

Link to this function

call(resolution, opts)

Make sure the captcha extension is provided for the request.

If defer: true, do not actually verify the captcha yet. Let the resolver call verify() and check if the resolution is failed.

Link to this function

captcha_error(msg, code)

Link to this function

verify(resolution)

If the hcaptcha or procaptcha is configured for the instance, verify the captcha. Otherwise, noop.

Link to this function

verify_hcaptcha(resolution, secret)