Sha256: 73fa36608266bb50e7bce8f26bf94dc056ec7e0fe947bae4c9cd00333b50c845
Contents?: true
Size: 577 Bytes
Versions: 5
Compression:
Stored size: 577 Bytes
Contents
module AuthorizationEndpoint class Client def initialize(url) raise ArgumentError, "url must be a String (given #{url.class.name})" unless url.is_a?(String) @uri = Addressable::URI.parse(url) raise ArgumentError, 'url must be an absolute URI (e.g. https://example.com)' unless @uri.absolute? rescue Addressable::URI::InvalidURIError => error raise InvalidURIError, error end def endpoint @endpoint ||= Discover.new(response).endpoint end def response @response ||= Response.new(@uri).response end end end
Version data entries
5 entries across 5 versions & 1 rubygems