Method: OmniAuth::Strategies::TypePad#initialize

Defined in:
lib/omniauth/strategies/oauth/type_pad.rb

#initialize(app, consumer_key = nil, consumer_secret = nil, options = {}, &block) ⇒ TypePad

Returns a new instance of TypePad.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/omniauth/strategies/oauth/type_pad.rb', line 13

def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
  # TypePad uses the application ID for one of the OAuth paths.
  app_id = options[:application_id]
  client_options = {
    :access_token_path => '/secure/services/oauth/access_token',
    :authorize_path => "/secure/services/api/#{app_id}/oauth-approve",
    :http_method => :get,
    # You *must* use query_string for the token dance.
    :scheme => :query_string,
    :site => 'https://www.typepad.com',
    :request_token_path => '/secure/services/oauth/request_token',
  }
  options.merge! :scheme => :query_string, :http_method => :get
  super(app, :type_pad, consumer_key, consumer_secret, client_options, options, &block)
end