Sha256: f89c9091e471a7d93c2b6065802eefef9fedd5918fc3df14f9889185db96133c

Contents?: true

Size: 531 Bytes

Versions: 80

Compression:

Stored size: 531 Bytes

Contents

require 'digest/md5'

module FbGraph
  class Auth
    # NOTE:
    # If you want access token, use FbGraph::Auth.new(APP_ID, APP_SECRET, :cookie => {..}) instead
    class Cookie
      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
    end
  end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
fb_graph-2.1.13 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.12 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.11 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.10 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.9 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.8 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.7 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.6 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.5 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.4 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.3 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.2 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.1 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.0 lib/fb_graph/auth/cookie.rb
fb_graph-2.1.0.alpha lib/fb_graph/auth/cookie.rb
fb_graph-2.0.2 lib/fb_graph/auth/cookie.rb
fb_graph-2.0.1 lib/fb_graph/auth/cookie.rb
fb_graph-2.0.0 lib/fb_graph/auth/cookie.rb
fb_graph-2.0.0.beta lib/fb_graph/auth/cookie.rb
fb_graph-2.0.0.alpha lib/fb_graph/auth/cookie.rb