Class: OmniAuth::Strategies::Zimbra

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

Instance Method Summary collapse

Instance Method Details

#callback_phaseObject



21
22
23
24
25
# File 'lib/omniauth/strategies/zimbra.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



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

def request_phase
  OmniAuth::Form.build(:title => options.title, :url => callback_path) do
    text_field 'Email', 'email'
    password_field 'Password', 'password'
    button "Sign In"
  end.to_response
end