(POOLER-71) Add dummy authentication provider

Previously it was difficult to do local development as VMPooler requires an LDAP
service for authentication. This commit adds a dummy authentication provider.
The provider has passes authentication if the username and password are
different, and fails if the username and password are the same.  This commit
also updates the documentation in the config YML file.
This commit is contained in:
Glenn Sarti 2017-02-04 20:10:02 -08:00 committed by Ryan McKern
parent 71a5af9e88
commit 2c74f4fa3a
2 changed files with 26 additions and 3 deletions

View file

@ -56,6 +56,8 @@ module Vmpooler
def authenticate(auth, username_str, password_str)
case auth['provider']
when 'dummy'
return (username_str != password_str)
when 'ldap'
require 'rubygems'
require 'net/ldap'