Sha256: f11c6bb9f70011eb8b40ba5e90d5dbad0e87d452fe77d3f8212cb4e82bfd2b78

Contents?: true

Size: 473 Bytes

Versions: 60

Compression:

Stored size: 473 Bytes

Contents

class OauthController < ApplicationController
  before_filter do |c|
    c.send :head, c.oauth.deny! if c.oauth.scope.include?("time-travel") # Only Superman can do that
  end

  def authorize
    render :text=>"client: #{oauth.client.display_name}\nscope: #{oauth.scope.join(", ")}\nauthorization: #{oauth.authorization}"
  end

  def grant
    head oauth.grant!(params["authorization"], "Batman")
  end

  def deny
    head oauth.deny!(params["authorization"])
  end
end

Version data entries

60 entries across 33 versions & 2 rubygems

Version Path
rack-oauth2-server-2.3.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.3.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.2.2 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.2.2 test/rails3/app/controllers/oauth_controller.rb
tpitale-rack-oauth2-server-2.2.1.2 test/rails2/app/controllers/oauth_controller.rb
tpitale-rack-oauth2-server-2.2.1.2 test/rails3/app/controllers/oauth_controller.rb
tpitale-rack-oauth2-server-2.2.1.1 test/rails2/app/controllers/oauth_controller.rb
tpitale-rack-oauth2-server-2.2.1.1 test/rails3/app/controllers/oauth_controller.rb
tpitale-rack-oauth2-server-2.2.1 test/rails3/app/controllers/oauth_controller.rb
tpitale-rack-oauth2-server-2.2.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.2.1 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.2.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.2.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.2.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.1.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.1.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.0.1 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.0.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.0.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.0.0 test/rails2/app/controllers/oauth_controller.rb