-require 'oauth/controllers/provider_controller'
+require "oauth/controllers/provider_controller"
class OauthController < ApplicationController
include OAuth::Controllers::ProviderController
- layout 'site'
+ layout "site"
def login_required
authorize_web
@token = current_user.oauth_tokens.find_by_token params[:token]
if @token
@token.invalidate!
- flash[:notice] = t('oauth.revoke.flash', :application => @token.client_application.name)
+ flash[:notice] = t("oauth.revoke.flash", :application => @token.client_application.name)
end
redirect_to oauth_clients_url(:display_name => @token.user.display_name)
end
protected
def oauth1_authorize
- unless @token
- render :action => "authorize_failure"
- return
- end
-
if @token.invalidated?
@message = t "oauth.oauthorize_failure.invalid"
render :action => "authorize_failure"
"oauth_token=#{@token.token}"
else
@redirect_url.query +
- "&oauth_token=#{@token.token}"
+ "&oauth_token=#{@token.token}"
end
unless @token.oauth10?