# `MishkaCmsCore.Captcha.Providers.HCaptcha`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/captcha/providers/hcaptcha.ex#L5)

[hCaptcha](https://docs.hcaptcha.com/) as a captcha provider: a box the visitor ticks, which may ask
a challenge.

Each scope keeps its own site key (`security.captcha.hcaptcha.site_key`) and secret key
(`security.captcha.hcaptcha.secret_key`, a `:secret` setting). The site key goes with every check,
so a token solved for another key is refused. A token is good for one check, within two minutes.

hCaptcha's published test keys — site key `10000000-ffff-ffff-ffff-000000000001`, secret
`0x0000000000000000000000000000000000000000` — pass every check (`test?: true`), so their answer is
not held to the site's address, nor remembered as used.

# `error_return`

```elixir
@type error_return() ::
  {:error, [%{action: atom(), field: atom(), message: String.t()}]}
```

# `okey_return`

```elixir
@type okey_return() :: {:ok, struct() | map() | module() | [any()]}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `config`

```elixir
@spec config() :: keyword()
```

# `config`

```elixir
@spec config(atom()) :: any()
```

# `enable`

```elixir
@spec enable() :: okey_return() | error_return()
```

# `get`

```elixir
@spec get() :: keyword()
```

# `health_check`

```elixir
@spec health_check() :: :ok | {:degraded, term()} | {:error, term()}
```

Optional. See `c:MishkaInstaller.Event.Hook.health_check/0`. Override to report health.

# `on_dependency_error`

```elixir
@spec on_dependency_error(term()) :: term()
```

Optional. See `c:MishkaInstaller.Event.Hook.on_dependency_error/1`. Override to react.

# `register`

```elixir
@spec register() :: okey_return() | error_return()
```

# `restart`

```elixir
@spec restart() :: okey_return() | error_return()
```

# `start`

```elixir
@spec start() :: okey_return() | error_return()
```

# `start_link`

# `stop`

```elixir
@spec stop() :: okey_return() | error_return()
```

# `unregister`

```elixir
@spec unregister() :: okey_return() | error_return()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
