Sha256: ed538f8b5a62261e96486e3846a330bf025beda9a4a0a76ca1cb1dec115594dd

Contents?: true

Size: 434 Bytes

Versions: 7

Compression:

Stored size: 434 Bytes

Contents

module Services
  module Hubspot
    module Authorization
      module Tokens
        class Base
          CALLBACK_PATH = '/oauth/hubspot_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

7 entries across 7 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.3.0 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.2.0 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.1.1 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb
hubspot-api-client-7.1.0 sample-apps/trello-integration-app/app/lib/services/hubspot/authorization/tokens/base.rb