Sha256: cb5ac360f05741ec45345492506b8e7595971250482819f8fdcc00d083d05e02

Contents?: true

Size: 429 Bytes

Versions: 29

Compression:

Stored size: 429 Bytes

Contents

module Rack
  module OAuth2
    class AccessToken
      class Legacy < AccessToken
        def initialize(attributes = {})
          super
          self.expires_in = self.expires_in.try(:to_i)
        end

        def to_s # This is for fb_graph
          self.access_token
        end

        def authenticate(request)
          request.header["Authorization"] = "OAuth #{access_token}"
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
rack-oauth2-1.0.0 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.9 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.8 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.7 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.6 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.5 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.4 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.3 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.2 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.1 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.14.0 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.13.0 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.12.2 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.12.1 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.12.0 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.11.0 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.10.1 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.10.0 lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.10.0.alpha lib/rack/oauth2/access_token/legacy.rb
rack-oauth2-0.9.5 lib/rack/oauth2/access_token/legacy.rb