Sha256: 005a0d0954da2cc43f6e28a03e92396b5036f606d6c25d13d4b3dfda6df0d0ba

Contents?: true

Size: 469 Bytes

Versions: 23

Compression:

Stored size: 469 Bytes

Contents

require 'rest-core/middleware'

# http://tools.ietf.org/html/rfc6749
class RestCore::Oauth2Query
  def self.members; [:access_token]; end
  include RestCore::Middleware

  def call env, &k
    local = if access_token(env)
              env.merge(REQUEST_QUERY =>
                          {'access_token' => access_token(env)}.
                           merge(env[REQUEST_QUERY]))
            else
              env
            end

    app.call(local, &k)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rest-core-3.6.0 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.92 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.91 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.9 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.8 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.7 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.6 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.5 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.4 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.3 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.2 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.1 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.5.0 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.4.1 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.4.0 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.3.3 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.3.2 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.3.1 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.3.0 lib/rest-core/middleware/oauth2_query.rb
rest-core-3.2.0 lib/rest-core/middleware/oauth2_query.rb