class TeamcityRestClient::HttpBasicAuthentication
Public Class Methods
new(host, port, user, password, openuri_options = {})
click to toggle source
Calls superclass method
TeamcityRestClient::Authentication::new
# File lib/teamcity-rest-client.rb, line 119 def initialize host, port, user, password, openuri_options = {} super({:http_basic_authentication => [user, password]}.merge(openuri_options)) @host, @port, @user, @password = host, port, user, password end
Public Instance Methods
to_s()
click to toggle source
# File lib/teamcity-rest-client.rb, line 130 def to_s "HttpBasicAuthentication #{@user}:#{@password}" end
url(path, params = {})
click to toggle source
# File lib/teamcity-rest-client.rb, line 124 def url path, params = {} auth_path = path.start_with?("/httpAuth/") ? path : "/httpAuth#{path}" query_string = !params.empty? ? "?#{query_string_for(params)}" : "" "http://#{@host}:#{@port}#{auth_path}#{query_string}" end