使用HttpClient为当前用户转发身份/身份验证

时间:2018-08-13 19:09:00

标签: asp.net authentication asp.net-web-api

我正在尝试将有关当前用户的所有身份信息转发到其他Web api。

但是当它到达另一个Web api时,标识将重置并且该请求不再经过身份验证。

该标识是ClaimsIdentity。

代码如下:

[HttpPost]
public Task<HttpResponseMessage> Post()
{
    var url = new Uri("https://localhost:44399/api/chatclient/");
    Request.RequestUri = url;
    var client = new HttpClient();
    return client.SendAsync(Request);
}

0 个答案:

没有答案
相关问题