Sha256: 6cf35a39708966728ddfb6bf3fda26411ecb475f2d732c825c008569bb75ef4b

Contents?: true

Size: 509 Bytes

Versions: 22

Compression:

Stored size: 509 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 '/companies'
    end

    def login;end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hubspot-api-client-9.0.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.1 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-8.0.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.3.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.2.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.1 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.1.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-7.0.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-6.0.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-5.0.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-4.0.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-3.3.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-3.2.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-3.1.1 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-3.1.0.pre.beta sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-3.0.0.pre.beta sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-2.3.2 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-2.3.1 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-2.2.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb
hubspot-api-client-2.1.0 sample-apps/companies-app/app/controllers/oauth/authorization_controller.rb