Method: PortalModule::Client#login

Defined in:
lib/portal_module/client.rb

#login(user = nil, pass = nil) ⇒ Object

Login to the portal

If no credentials are provided, try to get credentials from the config object.



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/portal_module/client.rb', line 48

def (user = nil, pass = nil)
  if @logged_in
    return true
  end

  user, pass = verify_credentials user, pass

  logout
  page_factory.(true).(user, pass)
  @logged_in = true
end