Class: Oauth::AuthorizedApplicationsController

Inherits:
Doorkeeper::AuthorizedApplicationsController
  • Object
show all
Includes:
PageLayoutHelper
Defined in:
app/controllers/oauth/authorized_applications_controller.rb

Instance Method Summary collapse

Methods included from PageLayoutHelper

#blank_container, #container_class, #fluid_layout, #header_title, #nav, #page_card_attributes, #page_card_meta_tags, #page_description, #page_image, #page_title, #sidebar

Instance Method Details

#destroyObject


6
7
8
9
10
11
12
13
14
# File 'app/controllers/oauth/authorized_applications_controller.rb', line 6

def destroy
  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

  redirect_to applications_profile_url, notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
end