Skip to content
This repository

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

branch: master

Fetching latest commit…


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 Rakefile
Octocat-spinner-32 door_code.gemspec

Door Code

Restrict access with a 3-6 digit PIN code.

gem install door_code


# 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


There is a simple demo application running on Heroku at Log in using the default door code: 12345


  • 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.