Simple plug to secure your server with password
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock

README.md

PlugPassword

Build Status

Simple authentication plug based on rack_password. Similary it will ask you for password only once and store it in your cookie (not like basic auth).

Hex.pm package HexDocs

Installation

The package can be installed by adding plug_password to your list of dependencies in mix.exs:

def deps do
  [
    {:plug_password, "~> 0.3.0"}
  ]
end

then plug it before your router:

plug PlugPassword.Block, passwords: ["hello", world],
  template: Authentication,
  path_whitelist: ~r/users/,
  ip_whitelist: ["86.123.112.78"],
  custom_rule: &Authentication.custom_rule/1

plug PlugPasswordTestWeb.Router

check possible options to pass to plug in HexDocs.