Sha256: 975a1a45163eed970cf9944f867b964cd923f415bc7d03f389828c6c3d0ccf9a

Contents?: true

Size: 462 Bytes

Versions: 70

Compression:

Stored size: 462 Bytes

Contents

module Hubspot
  class OAuthHelper
    AUTHORIZE_URL = 'https://app.hubspot.com/oauth/authorize'.freeze
    class << self
      def authorize_url(client_id:, redirect_uri:, scope:, optional_scope: [])
        query = URI.encode_www_form(
          client_id: client_id,
          redirect_uri: redirect_uri,
          scope: Array(scope),
          optional_scope: Array(optional_scope)
        )

        "#{AUTHORIZE_URL}?#{query}"
      end
    end
  end
end

Version data entries

70 entries across 70 versions & 2 rubygems

Version Path
hubspot-api-client-17.0.0.pre.beta.4 lib/hubspot/oauth_helper.rb
hubspot-api-client-17.0.0.pre.beta.3 lib/hubspot/oauth_helper.rb
hubspot-api-client-17.0.0.pre.beta.2 lib/hubspot/oauth_helper.rb
hubspot-api-client-17.0.0.pre.beta.1 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.4.0 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.3.0 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.2.1 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.2.0 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.1.1 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.1.0 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.0.4 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.0.3 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.0.2 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.0.1 lib/hubspot/oauth_helper.rb
hubspot-api-client-16.0.0 lib/hubspot/oauth_helper.rb
hubspot-api-client-15.0.2 lib/hubspot/oauth_helper.rb
hubspot-api-client-15.0.1 lib/hubspot/oauth_helper.rb
hubspot-api-client-15.0.0 lib/hubspot/oauth_helper.rb
hubspot-api-client-14.5.2 lib/hubspot/oauth_helper.rb
hubspot-api-client-14.5.1 lib/hubspot/oauth_helper.rb