Sha256: 06c198cb958d36bfdbf8948f16a0188f14c3dcf8542b9c10d3b7f7888c017450
Contents?: true
Size: 624 Bytes
Versions: 14
Compression:
Stored size: 624 Bytes
Contents
module Doorkeeper class Application include Mongoid::Document include Mongoid::Timestamps include Models::Mongoid2::Scopes include ApplicationMixin self.store_in :oauth_applications field :name, type: String field :uid, type: String field :secret, type: String field :redirect_uri, type: String index :uid, unique: true has_many :authorized_tokens, class_name: 'Doorkeeper::AccessToken' def self.authorized_for(resource_owner) ids = AccessToken.where(resource_owner_id: resource_owner.id, revoked_at: nil).map(&:application_id) find(ids) end end end
Version data entries
14 entries across 14 versions & 3 rubygems