Class: Doorkeeper::OAuth::Authorization::URIBuilder
- Inherits:
-
Object
- Object
- Doorkeeper::OAuth::Authorization::URIBuilder
- Defined in:
- lib/doorkeeper/oauth/authorization/uri_builder.rb
Class Method Summary collapse
Class Method Details
.uri_with_fragment(url, parameters = {}) ⇒ Object
17 18 19 20 21 |
# File 'lib/doorkeeper/oauth/authorization/uri_builder.rb', line 17 def uri_with_fragment(url, parameters = {}) uri = URI.parse(url) uri.fragment = build_query(parameters) uri.to_s end |
.uri_with_query(url, parameters = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/doorkeeper/oauth/authorization/uri_builder.rb', line 10 def uri_with_query(url, parameters = {}) uri = URI.parse(url) original_query = Rack::Utils.parse_query(uri.query) uri.query = build_query(original_query.merge(parameters)) uri.to_s end |