Skip to content

azranel/plug_password

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple plug to secure your server with password

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages