module Ivona::Auth

Public Class Methods

check_token(token) click to toggle source

Verify that token and md5 are legit. A response of 1 confirms that they are.

# File lib/ivona/authorization.rb, line 13
def check_token(token)
  params = "token=#{token}&md5=#{Ivona::GetMd5.formula(token)}"
  HTTParty.get("#{BASE_URL}/tokens?#{params}")
end
get_token() click to toggle source

Make a request for a token

# File lib/ivona/authorization.rb, line 6
def get_token
  email = Ivona::Config.email
  options = { :body => "email=#{email}" }
  HTTParty.post("#{BASE_URL}/tokens/", options)
end