HttpWebRequest 使用token访问 IdentityServer保护起来的api
HttpWebRequest request = WebRequest.Create("http://localhost:5001/identity") as HttpWebRequest;
request.Method = "GET";
var headers = request.Headers;
headers["Authorization"] = "Bearer " + key; //传递进去认证Token
request.Headers = headers;
HttpWebResponse response;