Sha256: be2c85f398f47f59eb70258adff027265d9910b90851596c4f6579dd49b5de33
Contents?: true
Size: 704 Bytes
Versions: 15
Compression:
Stored size: 704 Bytes
Contents
module Services module Authorization module Tokens class Generate < Tokens::Base def initialize(code:, request:) @code = code @request = request end def call tokens_api = ::Hubspot::OAuth::TokensApi.new tokens = tokens_api.post_oauth_v1_token( grant_type: :authorization_code, code: @code, redirect_uri: redirect_uri, client_id: ENV['HUBSPOT_CLIENT_ID'], client_secret: ENV['HUBSPOT_CLIENT_SECRET'], return_type: 'Object' ) tokens[:expires_at] = expires_at(tokens[:expires_in]) tokens end end end end end
Version data entries
15 entries across 9 versions & 1 rubygems