在我的处理程序代码中,尝试使用必要的 openid 标头/正文返回重定向响应以执行用户代理重定向以进行身份验证,但是当我在操作结果中使用 HTTPEntity 设置返回响应时,我得到 406 Not Acceptable 在客户端?那有什么问题?以下代码不完整,具有原型质量!
这是我的处理程序代码:
private static OpenIdRelyingParty openid = new OpenIdRelyingParty();
public OperationResult Get(string contentId)
{
var response = openid.GetResponse();
Identifier id;
Identifier.TryParse("https://www.google.com/accounts/o8/id", out id);
OutgoingWebResponse owr = openid.CreateRequest(id).RedirectingResponse;
HttpEntity he = new HttpEntity(new HttpHeaderDictionary(owr.Headers), owr.ResponseStream);
return new OperationResult.SeeOther { ResponseResource = he };
}