Sha256: 526514699183ccd127155cf8f34b3564909d4cad281195557facfdae04fe83ed

Contents?: true

Size: 358 Bytes

Versions: 5

Compression:

Stored size: 358 Bytes

Contents

class AuthSourceInternal < AuthSource

  def authenticate(login, password)
    return nil if login.blank? || password.blank?

    User.unscoped.first(:conditions => ["login=?", login]).try :matching_password?, password
  end

  def auth_method_name
    "INTERNAL"
  end
  alias_method :to_label, :auth_method_name

  def can_set_password?
    true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/models/auth_source_internal.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/models/auth_source_internal.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/models/auth_source_internal.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/models/auth_source_internal.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/models/auth_source_internal.rb