Sha256: 0168125c41e9f51bc8f2e1e0e990ff19bd221eb79bf46df7f2c67e490818e901
Contents?: true
Size: 593 Bytes
Versions: 4
Compression:
Stored size: 593 Bytes
Contents
module GoogleSpreadsheetFetcher module Authorizer class ServiceAccount include Interface def initialize(credential, scope: nil) @credential = credential @scope = scope || ::GoogleSpreadsheetFetcher.config.scopes freeze end def setup!; end def fetch_credentials!(user_id: nil) ::Google::Auth::ServiceAccountCredentials.make_creds( json_key_io: StringIO.new(credential), scope: scope ).tap(&:fetch_access_token!) end private attr_reader :credential, :scope end end end
Version data entries
4 entries across 4 versions & 1 rubygems