2014-12-19 14:15:29 +00:00
|
|
|
class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController
|
2015-05-01 08:39:11 +00:00
|
|
|
include PageLayoutHelper
|
|
|
|
|
|
|
|
layout 'profile'
|
2014-12-19 14:15:29 +00:00
|
|
|
|
|
|
|
def destroy
|
2015-07-02 09:53:31 +00:00
|
|
|
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
|
|
|
|
|
2014-12-25 16:35:04 +00:00
|
|
|
redirect_to applications_profile_url, notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
|
2014-12-19 14:15:29 +00:00
|
|
|
end
|
2014-12-25 14:46:28 +00:00
|
|
|
end
|