Sha256: 3d7df113237e6ea76236326ae575bd235cee48cc7be1df8953d384395f9fd128

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  class AccessToken < Sequel::Model(:oauth_access_tokens)
    include DoorkeeperSequel::AccessTokenMixin

    class << self
      def active_for(resource_owner)
        where(resource_owner_id: resource_owner.id, revoked_at: nil)
      end

      def order_method
        :order
      end

      def created_at_desc
        ::Sequel.desc(:created_at)
      end

      def refresh_token_revoked_on_use?
        columns.include?(:previous_refresh_token)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doorkeeper-sequel-2.1.0 lib/doorkeeper/orm/sequel/access_token.rb