Sha256: 5fa0ecab042b370d04c82c0db93633f13a0d115c986c58cda9c04f6262d12ab2
Contents?: true
Size: 612 Bytes
Versions: 26
Compression:
Stored size: 612 Bytes
Contents
# frozen_string_literal: true module Doorkeeper module Models module Scopes def scopes OAuth::Scopes.from_string(scopes_string) end def scopes=(value) if value.is_a?(Array) super(Doorkeeper::OAuth::Scopes.from_array(value).to_s) else super(Doorkeeper::OAuth::Scopes.from_string(value.to_s).to_s) end end def scopes_string self[:scopes] end def includes_scope?(*required_scopes) required_scopes.blank? || required_scopes.any? { |scope| scopes.exists?(scope.to_s) } end end end end
Version data entries
26 entries across 26 versions & 1 rubygems