class OmniAuth::Strategies::Hanami

Public Instance Methods

callback_phase() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/hanami.rb, line 11
def callback_phase
  return fail!(:invalid_credentials) unless identity
  super
end

Private Instance Methods

identity() click to toggle source
# File lib/omniauth/strategies/hanami.rb, line 22
def identity
  return @identity if @identity

  login = options.fetch(:auth_key).(request.params)
  password = options.fetch(:password_key).(request.params)
  result = interactor.new(login, password).call

  if result.success?
    @identity = result.user
  else
    @identity = nil
  end
end
interactor() click to toggle source
# File lib/omniauth/strategies/hanami.rb, line 36
def interactor
  options.fetch(:interactor)
end
model() click to toggle source
# File lib/omniauth/strategies/hanami.rb, line 40
def model
  options.fetch(:model)
end