我已经使用citrix网关完成了反向代理设置,并在citrix服务上绑定了我的服务器。
例:
代理服务器-http://server.com
项目托管的服务器-DotNetOpenAuth2
我在项目中使用了2019-08-01 12:51:26,966 [9] Prepared outgoing EndUserAuthorizationRequestC (2.0) message for http://abctest.com:8081/oauth/v1/authorize:
client_id: 88dd56af-05a7-48c2-863f-5fa3c8d2db6c
redirect_uri: https://proxyserver.com/login
state: AQGQC0_ksN0azjcwvMrsFA
scope: Profile
response_type: code
2019-08-01 12:52:31,536 [7] Prepared outgoing AccessTokenAuthorizationCodeRequestC (2.0) message for http://abctest.com:8081/oauth/token:
code: b2e644f443f24fc48c440aaa269c93f51cf2f13ae23d4d84858ae7e525bc1f7a
redirect_uri: http://server.com/login
grant_type: authorization_code
client_id: 88dd56af-05a7-48c2-863f-5fa3c8d2db6c
client_secret: ********
授权。实际上,我已经使用proxyserver url作为redirect_uri创建了OAuth请求。正确地重定向到登录页面,完成登录操作后,它已创建授权代码并重定向到我的代理服务器以进行令牌验证。由于将redirect_uri设置为托管服务器,因此ProcessUserAuthorization失败。由于请求与响应不同。
我得到的日志:
2019-08-02 10:54:31,130 [14] ERROR http://abctest.com:8081/oauth/token returned 400 BadRequest: Bad Request
2019-08-02 10:54:31,130 [14] ERROR
DotNetOpenAuth.Messaging.ProtocolException: Error occurred while sending a direct message or getting the response. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options)
--- End of inner exception stack trace ---
at DotNetOpenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options)
at DotNetOpenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage request)
at DotNetOpenAuth.Messaging.Channel.Request(IDirectedProtocolMessage requestMessage)
at DotNetOpenAuth.OAuth2.ClientBase.UpdateAuthorizationWithResponse(IAuthorizationState authorizationState, EndUserAuthorizationSuccessAuthCodeResponse authorizationSuccess)
at DotNetOpenAuth.OAuth2.WebServerClient.ProcessUserAuthorization(HttpRequestBase request)
出现以下错误:
Select T1.ID,
CASE WHEN T2.ID IS NULL THEN 1 END AS T1T2,
CASE WHEN T3.ID IS NULL THEN 2 END AS T1T3,
CASE WHEN T2.ID IS NULL AND T3.ID IS NULL THEN 3 END AS T1T2T3
From T1 LEFT JOIN T2
ON T1.ID = T2.ID
LEFT JOIN T3
ON T1.ID = T3.ID;