Module: Doorkeeper::Orm::ActiveRecord::Mixins::AccessToken::ClassMethods

Defined in:
lib/doorkeeper/orm/active_record/mixins/access_token.rb

Instance Method Summary collapse

Instance Method Details

#active_for(resource_owner) ⇒ ActiveRecord::Relation

Searches for not revoked Access Tokens associated with the specific Resource Owner.

Parameters:

  • resource_owner (ActiveRecord::Base)

    Resource Owner model instance

Returns:

  • (ActiveRecord::Relation)

    active Access Tokens for Resource Owner


42
43
44
# File 'lib/doorkeeper/orm/active_record/mixins/access_token.rb', line 42

def active_for(resource_owner)
  by_resource_owner(resource_owner).where(revoked_at: nil)
end

#refresh_token_revoked_on_use?Boolean

Returns:

  • (Boolean)

46
47
48
# File 'lib/doorkeeper/orm/active_record/mixins/access_token.rb', line 46

def refresh_token_revoked_on_use?
  column_names.include?("previous_refresh_token")
end