Method: OmniAuth::Strategies::Douban#initialize

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

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

Returns a new instance of Douban.



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

def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
  # Although in OAuth spec the :realm parameter is optional,
  # it is required for Douban.
  client_options = {
    :access_token_path => '/service/auth/access_token',
    :authorize_path => '/service/auth/authorize',
    :realm => 'OmniAuth',
    :request_token_path => '/service/auth/request_token',
    :site => 'http://www.douban.com',
  }

  super(app, :douban, consumer_key, consumer_secret, client_options, options, &block)
end