Sha256: 465e11b4d15ad15c2a7fa845a02247aac96e3f70bf2dedeef25639a1fd88619a

Contents?: true

Size: 468 Bytes

Versions: 26

Compression:

Stored size: 468 Bytes

Contents

module Doorkeeper
  module OAuth
    module Helpers
      module ScopeChecker
        def self.matches?(current_scopes, scopes)
          return false if current_scopes.nil? || scopes.nil?
          current_scopes == scopes
        end

        def self.valid?(scope, server_scopes)
          scope.present? &&
          scope !~ /[\n|\r|\t]/ &&
          server_scopes.has_scopes?(Doorkeeper::OAuth::Scopes.from_string(scope))
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
doorkeeper-1.3.1 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-1.3.0 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-1.2.0 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-1.1.0 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-1.0.0 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-1.0.0.rc2 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-1.0.0.rc1 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.7.4 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.7.3 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.7.2 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.7.1 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.7.0 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.7 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.6 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.5 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.4 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.3 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.2 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.1 lib/doorkeeper/oauth/helpers/scope_checker.rb
doorkeeper-0.6.0 lib/doorkeeper/oauth/helpers/scope_checker.rb