Sha256: b1eeeb48afd1f1909ba9b7a1548fa5425c68f9b6f403f41b7d22b13deb5d7583

Contents?: true

Size: 662 Bytes

Versions: 18

Compression:

Stored size: 662 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
  
  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

18 entries across 16 versions & 4 rubygems

Version Path
filiptepper-oauth-plugin-0.3.11 generators/oauth_consumer/templates/controller.rb
pelle-oauth-plugin-0.3.10 generators/oauth_consumer/templates/controller.rb
pelle-oauth-plugin-0.3.11 generators/oauth_consumer/templates/controller.rb
pelle-oauth-plugin-0.3.9 generators/oauth_consumer/templates/controller.rb
le1t0-oauth-plugin-0.3.14.001 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0.pre4 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0.pre3 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0.pre2 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0.pre2 lib/generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0.pre1 lib/generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.4.0.pre1 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.3.14 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.3.13 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.3.12 generators/oauth_consumer/templates/controller.rb
filiptepper-oauth-plugin-0.3.12 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.3.11 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.3.9 generators/oauth_consumer/templates/controller.rb
oauth-plugin-0.3.10 generators/oauth_consumer/templates/controller.rb