Skip to content
This repository

Restrict access to your site with a 3-6 digit PIN code

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 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.