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.4.7 lib/fb_graph/auth/cookie.rb
fb_graph-2.4.6 lib/fb_graph/auth/cookie.rb
fb_graph-2.4.4 lib/fb_graph/auth/cookie.rb
fb_graph-2.4.3 lib/fb_graph/auth/cookie.rb
fb_graph-2.4.2 lib/fb_graph/auth/cookie.rb
fb_graph-2.4.1 lib/fb_graph/auth/cookie.rb
fb_graph-2.4.0 lib/fb_graph/auth/cookie.rb
fb_graph-2.3.2 lib/fb_graph/auth/cookie.rb
fb_graph-2.3.1 lib/fb_graph/auth/cookie.rb
fb_graph-2.3.0 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.6 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.5 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.4 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.3 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.2 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.1 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.0 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.0.beta lib/fb_graph/auth/cookie.rb
fb_graph-2.2.0.alpha2 lib/fb_graph/auth/cookie.rb
fb_graph-2.2.0.alpha lib/fb_graph/auth/cookie.rb