Sha256: 03b7d101966b77a2628120e3fdce394f51b727c4abe68e94c6e0e8530108777d

Contents?: true

Size: 426 Bytes

Versions: 23

Compression:

Stored size: 426 Bytes

Contents

module Services
  module Hubspot
    module Authorization
      module Tokens
        class Base
          CALLBACK_PATH = '/oauth/callback'.freeze

          def expires_at(expires_in)
            Time.current + (expires_in * 0.95).round
          end

          private

          def redirect_uri
            @request.protocol + @request.host_with_port + CALLBACK_PATH
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 12 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.3.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.3.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.2.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.2.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.1.1 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.1.1 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.1.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.1.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.0.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.0.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-6.0.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-6.0.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-5.0.0 sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-5.0.0 sample-apps/search-result-paging-app/app/lib/services/hubspot/authorization/tokens/base.rb