Sha256: 30f1fe44d80a1cc14577573839fba28d154c1a5db13ba46af8f6d067c765740f

Contents?: true

Size: 344 Bytes

Versions: 34

Compression:

Stored size: 344 Bytes

Contents

module Doorkeeper
  module Models
    module Scopes
      def scopes
        OAuth::Scopes.from_string(self[:scopes])
      end

      def scopes_string
        self[:scopes]
      end

      def includes_scope?(*required_scopes)
        required_scopes.blank? || required_scopes.any? { |s| scopes.exists?(s.to_s) }
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
doorkeeper-3.0.0.rc2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-3.0.0.rc1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.2.1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.2.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.1.4 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.1.3 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.1.2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.1.1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.1.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.0.1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.0.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.0.0.rc3 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.0.0.rc2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.0.0.alpha1 lib/doorkeeper/models/concerns/scopes.rb