Sha256: 00ecd4ad450beddd07f25f7ce09e84c91d7179d345d8f076ff0f04a9a0b622bd

Contents?: true

Size: 905 Bytes

Versions: 19

Compression:

Stored size: 905 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  class AuthorizedApplicationsController < Doorkeeper::ApplicationController
    before_action :authenticate_resource_owner!

    def index
      @applications = Doorkeeper.config.application_model.authorized_for(current_resource_owner)

      respond_to do |format|
        format.html
        format.json { render json: @applications, current_resource_owner: current_resource_owner }
      end
    end

    def destroy
      Doorkeeper.config.application_model.revoke_tokens_and_grants_for(
        params[:id],
        current_resource_owner,
      )

      respond_to do |format|
        format.html do
          redirect_to oauth_authorized_applications_url, notice: I18n.t(
            :notice, scope: %i[doorkeeper flash authorized_applications destroy],
          )
        end

        format.json { head :no_content }
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
doorkeeper-5.8.0 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.7.1 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.7.0 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.9 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.8 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.7 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.6 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.5 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.4 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.3 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.2 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.1 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.0 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.0.rc2 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.6.0.rc1 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.5.4 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.5.3 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.5.2 app/controllers/doorkeeper/authorized_applications_controller.rb
doorkeeper-5.5.1 app/controllers/doorkeeper/authorized_applications_controller.rb