Class: OmniAuth::Strategies::ZimbraAdmin

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

Instance Method Summary collapse

Instance Method Details

#callback_phaseObject



22
23
24
25
26
# File 'lib/omniauth/strategies/zimbra_admin.rb', line 22

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
20
# File 'lib/omniauth/strategies/zimbra_admin.rb', line 14

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