tank taeyang

tank taeyang

  • NA
  • 287
  • 4.3k

Windows Authentication for Postman Restsharp

Sep 20 2020 8:05 PM
Currently,
 
I using the Postman Restsharp to retrieve the JWT token in iphone Safari mobile.
 
May I ask about how to add the Windows authentication?
 
I had tried the method as below, but I can't retrieve the response data.
But its work at Company Laptop.
  1. var client = new RestClient("https://mvponduty.com/XChange_App_Api/api/auth/authenticate");  
  2. client.Timeout = -1;  
  3. var request = new RestRequest(Method.GET);  
  4. request.UseDefaultCredentials = true;  
  5. request.AddHeader("Content-Type"" application/json; charset=utf-8");  
  6. request.AddHeader("Access-Control-Allow-Origin"" *");  
  7. request.AddHeader("Cache-Control"" no-cache");  
  8. request.AddHeader("Pragma"" no-cache");  
  9. request.AddHeader("Cookie"".AspNetCore.Session=CfDJ8AoxL%2BrAgZtDtnzh7ZplJfx4moiRGYT4rFtA6zp%2B1d8CAQ4D%2FZary6IvN%2Ftjm7wl2Ke992wbhnP7cmv3q7ba0%2BQoZKHuT%2B2FyJzIAjaJFH2GX0ZFiz1nHdSLyGhPMrG4KCNXZ94u79I7DHKjVAxcREfISUxxrFnxib0Aw1Q4yNQw");  
  10. request.AddParameter(" application/json; charset=utf-8""", ParameterType.RequestBody);  
  11. IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);  
References
https://stackoverflow.com/questions/63803288/windows-authentication-for-postman-restsharp

Answers (1)