Sha256: e4d2bff8e9ff88a40c8a7ca4fd62e2be21eea944d9f855a3332af8c5c71dc564

Contents?: true

Size: 599 Bytes

Versions: 2

Compression:

Stored size: 599 Bytes

Contents

require 'doorkeeper-mongodb/compatible'

module Doorkeeper
  class AccessGrant
    include DoorkeeperMongodb::Compatible

    include MongoMapper::Document

    include AccessGrantMixin

    safe
    timestamps!

    set_collection_name 'oauth_access_grants'

    key :resource_owner_id, ObjectId
    key :application_id,    ObjectId
    key :token,             String
    key :scopes,            String
    key :expires_in,        Integer
    key :redirect_uri,      String
    key :revoked_at,        DateTime

    def self.create_indexes
      ensure_index :token, unique: true
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
doorkeeper-mongodb-3.0.0 lib/doorkeeper/orm/mongo_mapper/access_grant.rb
dd-doorkeeper-mongodb-3.0.0 lib/doorkeeper/orm/mongo_mapper/access_grant.rb