Module: FlowAccount::Auth

Included in:
API
Defined in:
lib/flow_account/auth.rb

Instance Method Summary collapse

Instance Method Details

#authorize_url(options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/flow_account/auth.rb', line 11

def authorize_url(options={})
  options[:scope] ||= scope if !scope.nil? && !scope.empty?

  params = authorization_params.merge(options)
  connection.build_url("token", params).to_s
end

#get_access_token(options = {}) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/flow_account/auth.rb', line 3

def get_access_token(options={})
  options[:grant_type] ||= "client_credentials"
  options[:scope] ||= scope if !scope.nil? && !scope.empty?

  params = access_token_params.merge(options)
  post("token", params, raw=false, no_response_wrapper=true)
end