lib/todoable_api/sessionable.rb
# Using basic auth, retrieve a auth token
Using basic auth, retrieve a auth token
Using basic auth retrieve a auth token
def retrieve_auth_token
      http = Net::HTTP.new(auth_endpoint.host, auth_endpoint.port)
      request = Net::HTTP::Post.new(auth_endpoint.request_uri)
      request.basic_auth(
        TodoableApi.configuration.username,
        TodoableApi.configuration.password
      )
      handle_auth_response(http.request(request))
    end
def retrieve_auth_token http = Net :: HTTP . new ( auth_endpoint . host , auth_endpoint . port ) request = Net :: HTTP :: Post . new ( auth_endpoint . request_uri ) request . basic_auth ( TodoableApi . configuration . username , TodoableApi . configuration . password ) handle_auth_response ( http . request ( request ) ) end
Using basic auth, retrieve a auth token
Using basic auth retrieve a auth token