Sha256: 518a439375965b950fac19fbac9b9f26179266a56e112aac68a37e45f4d73a2b

Contents?: true

Size: 720 Bytes

Versions: 11

Compression:

Stored size: 720 Bytes

Contents

require 'oauth/controllers/consumer_controller'
class OauthConsumersController < ApplicationController
  include Oauth::Controllers::ConsumerController

  def index
    @consumer_tokens=ConsumerToken.all :conditions => {:user_id => current_user.id}
    @services=OAUTH_CREDENTIALS.keys-@consumer_tokens.collect{|c| c.class.service_name}
  end

  def callback
    super
  end

  def client
    super
  end

  protected

  # Change this to decide where you want to redirect user to after callback is finished.
  # params[:id] holds the service name so you could use this to redirect to various parts
  # of your application depending on what service you're connecting to.
  def go_back
    redirect_to root_url
  end

end

Version data entries

11 entries across 11 versions & 5 rubygems

Version Path
houston-oauth-plugin-0.5.1 generators/oauth_consumer/templates/controller.rb
oauth_consumer-0.1.3 generators/oauth_consumer/templates/controller.rb
panjiva-oauth-plugin-0.4.1 generators/oauth_consumer/templates/controller.rb
oauth_consumer-0.1.2 generators/oauth_consumer/templates/controller.rb
oauth_consumer-0.1.1 generators/oauth_consumer/templates/controller.rb
oauth_consumer-0.1.0 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.5.1 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.5.0 generators/oauth_consumer/templates/controller.rb
oauth-provider-0.5.0rc1 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.1 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0 generators/oauth_consumer/templates/controller.rb