Class: EME::Auth

Inherits:
APIConsumer
  • Object
show all
Defined in:
lib/eme/auth.rb

Class Method Summary collapse

Class Method Details

.generate_authentication_token(game_account_id, conn = connection) ⇒ Object



20
21
22
# File 'lib/eme/auth.rb', line 20

def self.generate_authentication_token(, conn = connection)
  do_request("/api/v1/generate_authentication_token?game_account_id=#{}", conn)
end

.make_ticket(game_account_id, conn = connection) ⇒ Object



5
6
7
# File 'lib/eme/auth.rb', line 5

def self.make_ticket(, conn = connection)
  do_request("/ticket/#{}", conn)
end

.verify_simple_ticket(ticket, conn = connection) ⇒ Object



10
11
12
13
# File 'lib/eme/auth.rb', line 10

def self.verify_simple_ticket(ticket, conn = connection)
  path = URI.encode("/ticket/#{ticket}/verify_simple")
  do_request(path, conn, {:method => :post, :errors => {'404' => 'Ticket not found or already used.'}})
end

.verify_ticket(ticket, conn = connection) ⇒ Object



15
16
17
18
# File 'lib/eme/auth.rb', line 15

def self.verify_ticket(ticket, conn = connection)
  path = URI.encode("/ticket/#{ticket}/verify")
  do_request(path, conn, {:method => :post, :errors => {'404' => 'Ticket not found or already used.'}})
end