Module: Devise::PamAdapter

Defined in:
lib/devise_pam_authenticatable/pam_adapter.rb

Class Method Summary collapse

Class Method Details

.valid_credentials?(username, password) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
15
# File 'lib/devise_pam_authenticatable/pam_adapter.rb', line 8

def self.valid_credentials?(username, password)
  if Rails.env.test? && username = 'testadmin' && password == 'test' then
    # If we're running in the test environment then return true
    # if the username is testadmin and password is test
    return true;
  end
  authpam(username, password)
end