Sha256: 1a9bef592f821bc4cae11f6664e7946b1c40154dd7a641696196cf5a5e710212
Contents?: true
Size: 452 Bytes
Versions: 13
Compression:
Stored size: 452 Bytes
Contents
require 'devise/strategies/base' class Devise::Strategies::PamAuthenticatable < Devise::Strategies::Authenticatable def valid? super && (::Devise.emailfield || ::Devise.usernamefield) end def authenticate! if (resource = mapping.to.authenticate_with_pam(params[scope].clone)) success!(resource) else fail(:invalid) end end end Warden::Strategies.add(:pam_authenticatable, Devise::Strategies::PamAuthenticatable)
Version data entries
13 entries across 13 versions & 1 rubygems