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-4.4.3 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.4.2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.4.1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.4.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.3.2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.3.1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.3.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.2.6 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.2.5 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.2.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.1.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.0.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.0.0.rc4 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.0.0.rc3 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.0.0.rc2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-4.0.0.rc1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-3.1.0 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-3.0.1 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-2.2.2 lib/doorkeeper/models/concerns/scopes.rb
doorkeeper-3.0.0 lib/doorkeeper/models/concerns/scopes.rb