Sha256: 09d268469b5a606f15845a38c94b88e3a9be84f0e7e21679f55f0bff1f11cf5d

Contents?: true

Size: 783 Bytes

Versions: 15

Compression:

Stored size: 783 Bytes

Contents

#!/usr/bin/env ruby

require_relative "../lib/amazon_auth"
require 'highline/import'

result = []

domain = ask("Enter your amazon domain: ") { |q| q.echo = true ; q.default = AmazonInfo.domain }
login = ask("Enter your #{domain} username: ") { |q| q.echo = true }
passwd = ask("Enter your #{domain} password: ") { |q| q.echo = "*" }
salt = ask("Enter your salt: ") { |q| q.default = AmazonAuth::Converter.default_salt ; q.echo = true }

raise "Empty login or password" if login.to_s.size == 0 || passwd.to_s.size == 0

converter = AmazonAuth::Converter.new(salt)

puts "Put the following lines in .env"
puts
puts "AMAZON_DOMAIN=#{domain}"
puts "AMAZON_USERNAME_CODE=#{converter.encode(login)}"
puts "AMAZON_PASSWORD_CODE=#{converter.encode(passwd)}"
puts "AMAZON_CODE_SALT=#{salt}"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
amazon_auth-0.4.5 exe/amazon_auth
amazon_auth-0.4.4 exe/amazon_auth
amazon_auth-0.4.3 exe/amazon_auth
amazon_auth-0.4.2 exe/amazon_auth
amazon_auth-0.4.1 exe/amazon_auth
amazon_auth-0.4.0 exe/amazon_auth
amazon_auth-0.3.3 exe/amazon_auth
amazon_auth-0.3.2 exe/amazon_auth
amazon_auth-0.3.1 exe/amazon_auth
amazon_auth-0.3.0 exe/amazon_auth
amazon_auth-0.2.1 exe/amazon_auth
amazon_auth-0.2.0 exe/amazon_auth
amazon_auth-0.1.5 exe/amazon_auth
amazon_auth-0.1.4 exe/amazon_auth
amazon_auth-0.1.3 exe/amazon_auth