Sha256: d4e74a56c9fe82e18af5b75c01e0e9c1d976d6ab52320d67f82c611cadb96ed4

Contents?: true

Size: 509 Bytes

Versions: 9

Compression:

Stored size: 509 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
fb_graph-2.7.17 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.16 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.15 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.14 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.13 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.12 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.11 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.10 lib/fb_graph/auth/cookie.rb
fb_graph-2.7.9 lib/fb_graph/auth/cookie.rb