Class: Force::Middleware::Authentication::Password

Inherits:
Force::Middleware::Authentication show all
Defined in:
lib/force/middleware/authentication/password.rb

Overview

Authentication middleware used if username and password flow is used

Instance Method Summary collapse

Methods inherited from Force::Middleware::Authentication

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

Methods inherited from Force::Middleware

#client, #connection, #initialize

Constructor Details

This class inherits a constructor from Force::Middleware

Instance Method Details

#paramsObject



4
5
6
7
8
9
10
11
# File 'lib/force/middleware/authentication/password.rb', line 4

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

#passwordObject



13
14
15
# File 'lib/force/middleware/authentication/password.rb', line 13

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