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, #favicon, #fluid_layout, #header_title, #nav, #page_card_attributes, #page_card_meta_tags, #page_description, #page_image, #page_title, #search_context, #sidebar

Instance Method Details

#destroyObject


15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/oauth/authorized_applications_controller.rb', line 15

def destroy
  if params[:token_id].present?
    current_resource_owner.oauth_authorized_tokens.find(params[:token_id]).revoke
  else
    Doorkeeper::Application.revoke_tokens_and_grants_for(params[:id], current_resource_owner)
  end

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

#indexObject


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

def index
  respond_to do |format|
    format.html { render "errors/not_found", layout: "errors", status: :not_found }
    format.json { render json: "", status: :not_found }
  end
end