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



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

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

#raw_infoObject



48
49
50
# File 'lib/omniauth/strategies/eventbrite.rb', line 48

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

#token_paramsObject



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

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