Class: OmniAuth::Strategies::Eventbrite

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/eventbrite.rb

Constant Summary collapse

DEFAULT_RESPONSE_TYPE =
'code'
DEFAULT_GRANT =
'authorization_code'

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



24
25
26
27
28
29
# File 'lib/omniauth/strategies/eventbrite.rb', line 24

def authorize_params
  super.tap do |params|
    params[:response_type] ||= DEFAULT_RESPONSE_TYPE
    params[:client_id] = client.id
  end
end

#raw_infoObject



54
55
56
# File 'lib/omniauth/strategies/eventbrite.rb', line 54

def raw_info
  @raw_info ||= access_token.get('/json/user_get').parsed['user']
end

#request_phaseObject



18
19
20
21
22
# File 'lib/omniauth/strategies/eventbrite.rb', line 18

def request_phase
  options[:response_type] ||= DEFAULT_RESPONSE_TYPE
  options[:client_id] = client.id
  super
end

#token_paramsObject



31
32
33
34
35
36
37
# File 'lib/omniauth/strategies/eventbrite.rb', line 31

def token_params
  super.tap do |params|
    params[:grant_type] ||= DEFAULT_GRANT
    params[:client_id] = client.id
    params[:client_secret] = client.secret
  end
end