Sha256: f6112a072c3497a0285ddfeeda426077af40a30da671691cd2318a040ca6a0e8

Contents?: true

Size: 500 Bytes

Versions: 64

Compression:

Stored size: 500 Bytes

Contents

module Oauth
  class AuthorizationController < ApplicationController
    def authorize
      url = Services::Authorization::GetAuthorizationUri.new(request: request).call
      redirect_to url
    end

    def callback
      session[:tokens] = Services::Authorization::Tokens::Generate.new(
        code: params[:code],
        request: request
      ).call
      Services::Authorization::AuthorizeHubspot.new(tokens: session[:tokens]).call
      redirect_to '/'
    end

    def login;end
  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/oauth/authorization_controller.rb
hubspot-api-client-9.0.0 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-9.0.0 sample-apps/retry-middleware-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.1 sample-apps/retry-middleware-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.1 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.1 sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.0 sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.0 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.0 sample-apps/retry-middleware-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.3.0 sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.3.0 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.3.0 sample-apps/retry-middleware-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.2.0 sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.2.0 sample-apps/retry-middleware-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.2.0 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.1 sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.1 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.1 sample-apps/retry-middleware-sample-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.0 sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.0 sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb