Sha256: c6e7f1ad11ecd2018f87c28e05df93226da95ebb572fb5e99c74f739942d1230

Contents?: true

Size: 507 Bytes

Versions: 12

Compression:

Stored size: 507 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 '/imports'
    end

    def login;end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.1 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.3.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.2.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.1 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.0.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-6.0.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-5.0.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-4.0.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-3.3.0 sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb