Method: Podio::Client#authenticate_with_credentials

Defined in:
lib/podio/client.rb

#authenticate_with_credentials(username, password) ⇒ Object

Sign in as a user using credentials



54
55
56
57
58
59
60
61
62
# File 'lib/podio/client.rb', line 54

def authenticate_with_credentials(username, password)
  response = @oauth_connection.post do |req|
    req.url '/oauth/token', :grant_type => 'password', :client_id => api_key, :client_secret => api_secret, :username => username, :password => password
  end

  @oauth_token = OAuthToken.new(response.body)
  configure_oauth
  @oauth_token
end