mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 02:18:41 -05:00
(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:
parent
48ed24a0de
commit
d962886cf8
2 changed files with 26 additions and 3 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue