class MachineClassifier::Authorizer

Constants

SERVICE_URL

Public Instance Methods

authorize() click to toggle source
# File lib/machine_classifier/authorizer.rb, line 5
def authorize
  service_account.authorize
end

Private Instance Methods

key() click to toggle source
# File lib/machine_classifier/authorizer.rb, line 19
def key
  OpenSSL::PKCS12.new(configuration.private_key, configuration.private_key_password).key
end
service_account() click to toggle source
# File lib/machine_classifier/authorizer.rb, line 11
def service_account
  @service_account ||= Google::APIClient::JWTAsserter.new(
    configuration.developer_email,
    SERVICE_URL,
    key
  )
end