Class: OmniAuth::Strategies::Hubspot

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

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



74
75
76
77
78
79
80
81
82
# File 'lib/omniauth/strategies/hubspot.rb', line 74

def authorize_params
  super.tap do |params|
    %w[scope].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]
      end
    end
  end
end

#callback_urlObject

private



90
91
92
# File 'lib/omniauth/strategies/hubspot.rb', line 90

def callback_url
  full_host + script_name + callback_path
end

#identityObject



84
85
86
# File 'lib/omniauth/strategies/hubspot.rb', line 84

def identity
  @identity ||= access_token.get("/oauth/v1/access-tokens/#{access_token.token}").parsed
end