mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
20 lines
434 B
Ruby
20 lines
434 B
Ruby
require 'faraday'
|
|
require 'vmfloaty/http'
|
|
|
|
class Auth
|
|
def self.get_token(user, url, password)
|
|
conn = Http.get_conn(url)
|
|
|
|
#resp = conn.post do |req|
|
|
# req.url '/v1/token'
|
|
# req.headers['Content-Type'] = 'application/json'
|
|
# req.user = user
|
|
# end
|
|
# if ok: true, return token
|
|
puts 'Got token'
|
|
end
|
|
|
|
def self.delete_token(user, token)
|
|
conn = Http.get_conn(url)
|
|
end
|
|
end
|