2015-04-26 12:48:37 +05:30
|
|
|
class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController
|
2015-09-11 14:41:01 +05:30
|
|
|
include PageLayoutHelper
|
|
|
|
|
|
|
|
layout 'profile'
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
def destroy
|
2015-09-11 14:41:01 +05:30
|
|
|
if params[:token_id].present?
|
|
|
|
current_resource_owner.oauth_authorized_tokens.find(params[:token_id]).revoke
|
|
|
|
else
|
|
|
|
Doorkeeper::AccessToken.revoke_all_for(params[:id], current_resource_owner)
|
|
|
|
end
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
redirect_to applications_profile_url, notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
|
|
|
|
end
|
|
|
|
end
|