Sha256: e60dd00dcf3d56ad4da274d6b1a099480957a1093c53894fd4257b384b0aa430
Contents?: true
Size: 797 Bytes
Versions: 15
Compression:
Stored size: 797 Bytes
Contents
module Doorkeeper module OAuth module Helpers module URIChecker def self.valid?(url) uri = as_uri(url) uri.fragment.nil? && !uri.host.nil? && !uri.scheme.nil? rescue URI::InvalidURIError false end def self.matches?(url, client_url) url, client_url = as_uri(url), as_uri(client_url) url.query = nil url == client_url end def self.valid_for_authorization?(url, client_url) valid?(url) && client_url.split.any? { |other_url| matches?(url, other_url) } end def self.as_uri(url) URI.parse(url) end def self.native_uri?(url) url == Doorkeeper.configuration.native_redirect_uri end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems