Class: OmniAuth::Strategies::HttpBasic

Inherits:
Object
  • Object
show all
Includes:
OmniAuth::Strategy
Defined in:
lib/omniauth/strategies/http_basic.rb

Instance Method Summary collapse

Instance Method Details

#callback_phaseObject



21
22
23
24
25
# File 'lib/omniauth/strategies/http_basic.rb', line 21

def callback_phase
  return fail!(:invalid_credentials) if !authentication_response
  return fail!(:invalid_credentials) if authentication_response.code.to_i >= 400
  super
end

#request_phaseObject



14
15
16
17
18
19
# File 'lib/omniauth/strategies/http_basic.rb', line 14

def request_phase
  OmniAuth::Form.build(:title => options.title, :url => callback_path) do
    text_field 'Username', 'username'
    password_field 'Password', 'password'
  end.to_response
end