class OauthConsumersController

Public Instance Methods

callback() click to toggle source
# File lib/generators/oauth_consumer/templates/controller.rb, line 15
def callback
      super
end
client() click to toggle source
# File lib/generators/oauth_consumer/templates/controller.rb, line 19
def client
  super
end
index() click to toggle source
# File lib/generators/oauth_consumer/templates/controller.rb, line 10
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 Instance Methods

go_back() click to toggle source

Change this to decide where you want to redirect user to after callback is finished. params 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.

# File lib/generators/oauth_consumer/templates/controller.rb, line 29
def go_back
  redirect_to root_url
end