Class: OmniAuth::Strategies::PAM

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

Instance Method Summary collapse

Instance Method Details

#callback_phaseObject



26
27
28
29
30
31
# File 'lib/omniauth/strategies/pam.rb', line 26

def callback_phase
  unless Rpam2.auth(options[:service], uid, request["password"])
    return fail!(:invalid_credentials)
  end
  super
end

#request_phaseObject



16
17
18
19
20
21
22
23
24
# File 'lib/omniauth/strategies/pam.rb', line 16

def request_phase
  OmniAuth::Form.build(
    title: (options[:title] || "Authenticate"),
    url: callback_path,
  ) do |field|
    field.text_field 'Username', 'username'
    field.password_field 'Password', 'password'
  end.to_response
end