Class: Restforce::Middleware::Authentication::Password

Inherits:
Restforce::Middleware::Authentication show all
Defined in:
lib/restforce/middleware/authentication/password.rb

Overview

Authentication middleware used if username and password flow is used

Instance Method Summary collapse

Methods inherited from Restforce::Middleware::Authentication

#authenticate!, #call, #connection, #error_message

Methods inherited from Restforce::Middleware

#client, #connection, #initialize

Constructor Details

This class inherits a constructor from Restforce::Middleware

Instance Method Details

#paramsObject



6
7
8
9
10
11
12
# File 'lib/restforce/middleware/authentication/password.rb', line 6

def params
  { :grant_type    => 'password',
    :client_id     => @options[:client_id],
    :client_secret => @options[:client_secret],
    :username      => @options[:username],
    :password      => password }
end

#passwordObject



14
15
16
# File 'lib/restforce/middleware/authentication/password.rb', line 14

def password
  "#{@options[:password]}#{@options[:security_token]}"
end