module Doorkeeper::Orm::ActiveRecord::Mixins::Application::ClassMethods

def authorized_for(resource_owner)

Returns:
  • (ActiveRecord::Relation) -

Parameters:
  • resource_owner (ActiveRecord::Base) --
def authorized_for(resource_owner)
  resource_access_tokens = Doorkeeper.config.access_token_model.active_for(resource_owner)
  where(id: resource_access_tokens.select(:application_id).distinct)
end

def compute_doorkeeper_table_name

def compute_doorkeeper_table_name
  table_name = "oauth_application"
  table_name = table_name.pluralize if pluralize_table_names
  "#{table_name_prefix}#{table_name}#{table_name_suffix}"
end

def revoke_tokens_and_grants_for(id, resource_owner)

Parameters:
  • resource_owner (ActiveRecord::Base) --
def revoke_tokens_and_grants_for(id, resource_owner)
  Doorkeeper.config.access_token_model.revoke_all_for(id, resource_owner)
  Doorkeeper.config.access_grant_model.revoke_all_for(id, resource_owner)
end