class OmniAuth::Strategies::Aleph
Public Instance Methods
callback_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/aleph.rb, line 36 def callback_phase return fail!(:missing_credentials) if missing_credentials? adaptor = OmniAuth::Aleph::Adaptor.new(@options) @raw_info = adaptor.authenticate(username, password) super rescue OmniAuth::Aleph::Adaptor::AlephError => e fail!(e.message) end
request_phase()
click to toggle source
# File lib/omniauth/strategies/aleph.rb, line 28 def request_phase OmniAuth::Aleph::Adaptor.validate @options OmniAuth::Form.build(title: options[:title], url: callback_path) do |f| f.text_field 'Login', 'username' f.password_field 'Password', 'password' end.to_response end
Private Instance Methods
missing_credentials?()
click to toggle source
# File lib/omniauth/strategies/aleph.rb, line 55 def missing_credentials? username.nil? || username.empty? || password.nil? || password.empty? end
password()
click to toggle source
# File lib/omniauth/strategies/aleph.rb, line 50 def password @password ||= request['password'] end
username()
click to toggle source
# File lib/omniauth/strategies/aleph.rb, line 45 def username @username ||= request['username'] end