Sha256: e3d2849cad5dfc7bcbd05784f6862e1ff268d7580f9c22fe26994ea98bf2ae4d
Contents?: true
Size: 464 Bytes
Versions: 5
Compression:
Stored size: 464 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.map(&:to_s).sort == scopes.split(" ").sort end def self.valid?(scope, server_scopes) scope.present? && scope !~ /[\n|\r|\t]/ && server_scopes.all_included?(scope) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems