Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Restrict access to your site with a 3-6 digit PIN code
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gemfile
README.md
Rakefile
door_code.gemspec

README.md

Door Code

Restrict access with a 3-6 digit PIN code.

gem install door_code

Configuration

# Rack
use DoorCode::RestrictedAccess, :code => '12345' # code must be 3-6 digits

# Rails
config.middleware.use DoorCode::RestrictedAccess, :code => '12345'

Optional, er, options:

use DoorCode::RestrictedAccess,
  :code => '12345', # set a single valid code
  :codes => ['12345','6789'], # set multiple valid codes

Demo

There is a simple demo application running on Heroku at http://doorcodedemo.heroku.com. Log in using the default door code: 12345

Notes

  • The default code is '12345'
  • All options passed to DoorCode are optional. If no valid codes are supplied, the default code will be activated

To Do

Something went wrong with that request. Please try again.