Sha256: 419693638ccabf6b3de9f966c7f770f358ee4bba00fb297cd1beeabbcaf94fe8

Contents?: true

Size: 396 Bytes

Versions: 64

Compression:

Stored size: 396 Bytes

Contents

class HomeController < ApplicationController
  before_action :authorize

  def index
  end

  private

  def authorize
    redirect_to login_path and return if session['tokens'].blank?

    session['tokens'] = Services::Authorization::Tokens::Refresh.new(tokens: session['tokens'], request: request).call
    Services::Authorization::AuthorizeHubspot.new(tokens: session['tokens']).call
  end
end

Version data entries

64 entries across 22 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-9.0.0 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb
hubspot-api-client-9.0.0 sample-apps/retry-middleware-sample-app/app/controllers/home_controller.rb
hubspot-api-client-8.0.1 sample-apps/retry-middleware-sample-app/app/controllers/home_controller.rb
hubspot-api-client-8.0.1 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb
hubspot-api-client-8.0.1 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-8.0.0 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-8.0.0 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb
hubspot-api-client-8.0.0 sample-apps/retry-middleware-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.3.0 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-7.3.0 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.3.0 sample-apps/retry-middleware-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.2.0 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-7.2.0 sample-apps/retry-middleware-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.2.0 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.1.1 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-7.1.1 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.1.1 sample-apps/retry-middleware-sample-app/app/controllers/home_controller.rb
hubspot-api-client-7.1.0 sample-apps/leaky-bucket-app/app/controllers/home_controller.rb
hubspot-api-client-7.1.0 sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb