Sha256: 9e8bc6a32e1472cf7768bd13aa0261c20ff4a6701edc66e653e4dc3fa3edc5a3

Contents?: true

Size: 375 Bytes

Versions: 156

Compression:

Stored size: 375 Bytes

Contents

module Services
  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

Version data entries

156 entries across 22 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/companies-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/contacts-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/imports-contacts-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/oauth-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-9.0.0 sample-apps/timeline-events-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/contacts-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/imports-contacts-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/timeline-events-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/companies-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.1 sample-apps/oauth-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/imports-contacts-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/contacts-app/app/lib/services/authorization/tokens/base.rb
hubspot-api-client-8.0.0 sample-apps/timeline-events-app/app/lib/services/authorization/tokens/base.rb