-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.rb
More file actions
35 lines (31 loc) · 739 Bytes
/
main.rb
File metadata and controls
35 lines (31 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require './authvaultix.rb'
AuthVaultix.new.Api(
"", # Application Name
"", # Application OwnerID
"", # Application Secret
"1.0" # Applicaiton Version
)
puts "\nConnecting..."
AuthVaultix.new.Init
puts "\n1) Login"
puts "2) Register"
puts "3) License Login"
puts "4) Exit"
print "\nChoose: "
opt = gets.chomp
case opt
when '1'
print "Username: "; u = gets.chomp
print "Password: "; p = gets.chomp
AuthVaultix.new.Login(u, p)
when '2'
print "Username: "; u = gets.chomp
print "Password: "; p = gets.chomp
print "License: "; k = gets.chomp
AuthVaultix.new.Register(u, p, k)
when '3'
print "License: "; k = gets.chomp
AuthVaultix.new.License(k)
else
puts "Goodbye!"
end