@request.env["HTTP_AUTHORIZATION"] = format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}"))
end
+ ##
+ # return request header for HTTP Basic Authorization
+ def basic_authorization_header(user, pass)
+ { "Authorization" => format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}")) }
+ end
+
##
# set request header for HTTP Accept
def http_accept_format(format)
@request.env["HTTP_X_ERROR_FORMAT"] = format
end
+ def error_format_header(f)
+ { "X-Error-Format" => f }
+ end
+
##
# Used to check that the error header and the forbidden responses are given
# when the owner of the changset has their data not marked as public
click_on "Login", :match => :first
end
+ def session_for(user)
+ post login_path, :params => { :username => user.display_name, :password => "test" }
+ follow_redirect!
+ end
+
def xml_for_node(node)
doc = OSM::API.new.get_xml_doc
doc.root << xml_node_for_node(node)