Class: OmniAuth::Strategies::PAM
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::PAM
- Includes:
- OmniAuth::Strategy
- Defined in:
- lib/omniauth/strategies/pam.rb
Instance Method Summary collapse
Instance Method Details
#callback_phase ⇒ Object
26 27 28 29 30 31 |
# File 'lib/omniauth/strategies/pam.rb', line 26 def callback_phase unless Rpam2.auth([:service], uid, request["password"]) return fail!(:invalid_credentials) end super end |
#request_phase ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/omniauth/strategies/pam.rb', line 16 def request_phase OmniAuth::Form.build( title: ([:title] || "Authenticate"), url: callback_path, ) do |field| field.text_field 'Username', 'username' field.password_field 'Password', 'password' end.to_response end |