Sha256: 392348f7a3b5bf096752692cca4cda56e3d2f3eff9639ebf8f62be6734d6db6f

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 Bytes

Contents

require 'doorkeeper/models/mongoid/scopes'
require 'doorkeeper/models/mongoid/version'

module Doorkeeper
  class AccessGrant
    include Mongoid::Document
    include Mongoid::Timestamps
    include Models::Mongoid::Scopes
    extend Models::Mongoid::Version

    self.store_in collection: :oauth_access_grants

    if defined?(Moped::BSON)
      field :resource_owner_id, type: Moped::BSON::ObjectId
    else
      field :resource_owner_id, type: BSON::ObjectId
    end

    field :application_id, type: Hash
    field :token, type: String
    field :expires_in, type: Integer
    field :redirect_uri, type: String
    field :revoked_at, type: DateTime

    index({ token: 1 }, { unique: true })
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
doorkeeper-1.4.2 lib/doorkeeper/models/mongoid3_4/access_grant.rb
doorkeeper-1.4.1 lib/doorkeeper/models/mongoid3_4/access_grant.rb
doorkeeper-1.4.0 lib/doorkeeper/models/mongoid3_4/access_grant.rb