exrecaptcha alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view exrecaptcha alternatives based on common mentions on social networks and blogs.
-
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
plug_canonical_host
PlugCanonicalHost ensures that all requests are served by a single canonical host. -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of exrecaptcha or a related project?
Popular Comparisons
README
Exrecaptcha
Simple ReCaptcha display/verify code for Elixir applications. Using Exrecaptcha with a CMS such as Phoenix is easy.
Installation
Set as a dep in your mix.exs and ensure it is running with your app:
def application do
[
# ...
applications: [:phoenix, :cowboy, :logger, :exrecaptcha]
# ...
]
end
defp deps do
[
{:phoenix, "0.5.0"},
{:cowboy, "~> 1.0.0"},
#...
{:ibrowse, github: "cmullaparthi/ibrowse", tag: "v4.1.0"},
{:exrecaptcha, "~> 0.0.3"}
]
end
And fetch your project's dependencies:
$ mix deps.get
Config
In your application's config.exs :
config :exrecaptcha,
api_config: %{ verify_url: "http://www.google.com/recaptcha/api/verify",
public_key: "YOUR_PUBLIC_KEY",
private_key: "YOUR_PRIVATE_KEY" }
You can use https instead of http for the verify_url
.
Usage
View
Put this code somewhere in your html template:
<form id="loginForm" name="newuser" method="post" action="/users">
...
<%= safe Exrecaptcha.display %>
...
</form>
Controller
Provided you've set the routing properly, you just have to call
# your post method should route you here:
def create(conn, params) do
# do stuff, then check for the validity of the captcha
:ok = verify_captcha(conn, params)
end
defp verify_captcha(conn, %{"recaptcha_challenge_field" => challenge,
"recaptcha_response_field" => response}) do
remote_ip = conn.remote_ip
Exrecaptcha.verify(remote_ip, challenge, response)
end
TODO
- No option for recaptcha display can be set yet
- Error handling is quite inexistent (throws RuntimeError)
- No tests
Changelog
- 0.0.3: Update HTTPotion dependency, avoiding elixir version warnings
- 0.0.2: Use HTTPS by default
- 0.0.1: Initial release
Licensing
Copyright ยฉ 2014 Adrien Anselme and contributors This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the COPYING file for more details.
*Note that all licence references and agreements mentioned in the exrecaptcha README section above
are relevant to that project's source code only.