Class: GSGraph::Auth::Cookie

Inherits:
Object
  • Object
show all
Defined in:
lib/gs_graph/auth/cookie.rb

Overview

NOTE: If you want access token, use GSGraph::Auth.new(APP_ID, APP_SECRET, :cookie => ..) instead

Class Method Summary collapse

Class Method Details

.parse(client, cookie) ⇒ Object

Raises:



8
9
10
11
12
13
14
15
16
17
# File 'lib/gs_graph/auth/cookie.rb', line 8

def self.parse(client, cookie)
  signed_request = case cookie
  when String
    cookie
  else
    cookie["fbsr_#{client.identifier}"]
  end
  raise VerificationFailed.new('Facebook cookie not found') if signed_request.blank?
  SignedRequest.verify(client, signed_request)
end