Class: OmniAuth::Backstage::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/omniauth/backstage/client.rb

Class Method Summary collapse

Class Method Details

.client_options(options) ⇒ Object

Raises:

  • (ArgumentError)


4
5
6
7
8
9
10
11
12
13
# File 'lib/omniauth/backstage/client.rb', line 4

def self.client_options(options)
  ok = %w{site authorize_url token_url}.all? {|param| options.include?(param.to_sym) }
  raise ArgumentError, 'Missing required parameters.' unless ok

  {
    site: options[:site],
    authorize_url: options[:authorize_url],
    token_url: options[:token_url]
  }
end