class OmniAuth::Strategies::Devise

Public Instance Methods

callback_phase() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/devise.rb, line 8
def callback_phase
  return fail!(:invalid_credentials) unless devise_model
  super
end
devise_model() click to toggle source
# File lib/omniauth/strategies/devise.rb, line 16
def devise_model
  @devise_model ||= from_warden || from_db
end
model() click to toggle source
# File lib/omniauth/strategies/devise.rb, line 20
def model
  options[:model] || ::EmailId
end

Private Instance Methods

from_db() click to toggle source
# File lib/omniauth/strategies/devise.rb, line 31
def from_db
  resource = model.
    find_for_database_authentication(request["session"].slice("email"))
  resource if resource.valid_password?(request["session"]["password"])
end
from_warden() click to toggle source
# File lib/omniauth/strategies/devise.rb, line 25
def from_warden
  warden = request.env['warden']
  warden.authenticate
  # false : should Iuse this or not ? pending.....
end