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.8.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.8.1 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.8.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.8.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.7.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.7.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.6.1 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.6.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.6.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.6.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.5.1 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.5.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.5.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.5.0 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.4.2 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.4.2 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.4.1 test/rails2/app/controllers/oauth_controller.rb
rack-oauth2-server-2.4.1 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.4.0 test/rails3/app/controllers/oauth_controller.rb
rack-oauth2-server-2.4.0 test/rails2/app/controllers/oauth_controller.rb