You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/08/06 21:14:32 UTC

[GitHub] dangogh closed pull request #2636: changes login to use go API

dangogh closed pull request #2636: changes login to use go API
URL: https://github.com/apache/trafficcontrol/pull/2636
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/bin/traffic_ops_ort.pl b/traffic_ops/bin/traffic_ops_ort.pl
index 34875bb12..f6fbc31df 100755
--- a/traffic_ops/bin/traffic_ops_ort.pl
+++ b/traffic_ops/bin/traffic_ops_ort.pl
@@ -1619,10 +1619,12 @@ sub get_cookie {
 		&sleep_rand($login_dispersion);
 	}
 
-	my $url = $to_host . "/login";
-	my $response = $lwp_conn->post( $url, [ 'u' => $u, 'p' => $p ], %headers );
+	my $url = $to_host . "/api/1.3/user/login";
+    	my $json = qq/{ "u": "$u", "p": "$p"}/;
+    	my $lwp = LWP::UserAgent->new;
+    	my $response = $lwp->post($url, Content => $json);
 
-	&check_lwp_response_code($response, $FATAL);
+    	&check_lwp_response_code($response, $FATAL);
 
 	my $cookie;
 	if ( $response->header('Set-Cookie') ) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services