UCWA身份验证问题 - 401之后出现400 [英] UCWA Authentication Issue - After 401 comes 400
问题描述
我正在尝试构建一个小型应用程序来获取lync用户。我使用UCWA Helper库及其中的示例。这是我到目前为止构建的代码。 : http://pastebin.com/Ws9SAszR
getPreventDefault() sollte nicht mehr verwendet werden。 Verwenden Sie stattdessen defaultPrevented。 jquery-1.6.2.min.js:17:0
GET https://lyncdiscoverinternal.company.de/xframe [HTTP / 1.1 200 OK 113ms]
" Doc ready ..." 192.168.10.78:30:16
"设置传输元素" 192.168.10.78:39:16
"开始自动发现" 192.168.10.78:48:16
" starting authentivation" 192.168.10.78:50:16
GET https://lyncdiscoverinternal.company.de/Autodiscover/XFrame/Scripts/jquery-1.7.2.min.js [HTTP / 1.1 200 OK 87ms]
GET自由软件网站25ms]
GET https://lyncdiscoverinternal.company.de/ [HTTP / 1.1 200 OK 28ms]
GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP / 1.1 200 OK 115ms]
GET https://lync.company.de/Autodiscover/XFrame/Scripts/jquery-1.7.2.min.js [HTTP / 1.1 200 OK 81ms]
GET https: //lync.company.de/Autodiscover/XFrame/Scripts/XFrame.js [HTTP / 1.1 200 OK 87ms]
GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP / 1.1 304未修改26ms]
GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP / 1.1 304未修改26ms]
GET https://lync.company。 de / Autodiscover / XFrame / Scripts / jquery-1.7.2.min.js [HTTP / 1.1 304 Not Modifi ed 26ms]
GET https://lync.company.de/Autodiscover/XFrame/Scripts/XFrame.js [HTTP / 1.1 304 Not Modified 27ms]
GET https://lync.company.de /Autodiscover/XFrame/XFrame.html [HTTP / 1.1 304未修改26ms]
GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP / 1.1 401 Unauthorized 29ms ]
OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP / 1.1 400 Bad Request 123ms]
Cross-Origin-Anfrage blockiert:Die Same-Origin-Regel verbietet,die externe Ressource auf https://ey-ls01.company.de/WebTicket/oauthtoken zu lesen。 Dieskanngelöstwerden,indem die Ressource auf die gleiche Domain geschoben wird oder CORS aktiviert wird。 oauthtoken
GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP / 1.1 401 Unauthorized 27ms]
OPTIONS https://ey-ls01.company。 de / WebTicket / oauthtoken [HTTP / 1.1 400 Bad Request 26ms]
GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP / 1.1 401 Unauthorized 28ms]
OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP / 1.1 400 Bad Request 26ms]
GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/ oauth / user [HTTP / 1.1 401 Unauthorized 27ms]
OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP / 1.1 400 Bad Request 26ms]
GET https:// lync .company.de / Autodiscover / AutodiscoverService.svc / root / oauth / user [HTTP / 1.1 401 Unauthorized 27ms]
OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP / 1.1 400 Bad请求26ms]
GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP / 1.1 401 Unauthorized 27ms]
OPTIONS https:// e y-ls01.company.de/WebTicket/oauthtoken [HTTP / 1.1 400 Bad Request 26ms]
GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP / 1.1 401 Unauthorized 27ms]
OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP / 1.1 400 Bad Request 27ms]
当我点击"Auth"时,我可以在Firefox中看到自动发现到目前为止,但正如您所看到的,在第一次401响应后,我得到400响应,表示"错误的请求"。
我认为这是因为同源政策。我已经激活了
< pre class ="prettyprint"> Header set Access-Control-Allow-Origin" *"
我的XAMPP测试机上的选项,没有任何影响。有没有人对我有建议?
您正从lync.company.de跳转到ey-ls01.company.de。
lync.company.de应该是您的外部Web服务FQDN,这应该通过反向代理进行固定,以便将其端口转换为运行在4443上的外部网站。
在正确配置的环境中,如果您访问外部网站,则401应继续引导您访问外部Web服务。FQDN&NBSP;由于您被定向到不同的FQDN,这意味着您实际上正在访问内部的
Web服务站点。
Hi,
I am trying to build a small application to get the presence of a lync user. I use the UCWA Helper libraries and the examples inside it. Here´s the code that i´ve build so far. : http://pastebin.com/Ws9SAszR
getPreventDefault() sollte nicht mehr verwendet werden. Verwenden Sie stattdessen defaultPrevented. jquery-1.6.2.min.js:17:0 GET https://lyncdiscoverinternal.company.de/xframe [HTTP/1.1 200 OK 113ms] "Doc ready..." 192.168.10.78:30:16 "Setting Transport element" 192.168.10.78:39:16 "Starting autodiscovery" 192.168.10.78:48:16 "starting authentivation" 192.168.10.78:50:16 GET https://lyncdiscoverinternal.company.de/Autodiscover/XFrame/Scripts/jquery-1.7.2.min.js [HTTP/1.1 200 OK 87ms] GET https://lyncdiscoverinternal.company.de/Autodiscover/XFrame/Scripts/XFrame.js [HTTP/1.1 200 OK 78ms] GET https://lyncdiscoverinternal.company.de/xframe [HTTP/1.1 304 Not Modified 25ms] GET https://lyncdiscoverinternal.company.de/ [HTTP/1.1 200 OK 28ms] GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP/1.1 200 OK 115ms] GET https://lync.company.de/Autodiscover/XFrame/Scripts/jquery-1.7.2.min.js [HTTP/1.1 200 OK 81ms] GET https://lync.company.de/Autodiscover/XFrame/Scripts/XFrame.js [HTTP/1.1 200 OK 87ms] GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP/1.1 304 Not Modified 26ms] GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP/1.1 304 Not Modified 26ms] GET https://lync.company.de/Autodiscover/XFrame/Scripts/jquery-1.7.2.min.js [HTTP/1.1 304 Not Modified 26ms] GET https://lync.company.de/Autodiscover/XFrame/Scripts/XFrame.js [HTTP/1.1 304 Not Modified 27ms] GET https://lync.company.de/Autodiscover/XFrame/XFrame.html [HTTP/1.1 304 Not Modified 26ms] GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 29ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 123ms] Cross-Origin-Anfrage blockiert: Die Same-Origin-Regel verbietet, die externe Ressource auf https://ey-ls01.company.de/WebTicket/oauthtoken zu lesen. Dies kann gelöst werden, indem die Ressource auf die gleiche Domain geschoben wird oder CORS aktiviert wird. oauthtoken GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 27ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 26ms] GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 28ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 26ms] GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 27ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 26ms] GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 27ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 26ms] GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 27ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 26ms] GET https://lync.company.de/Autodiscover/AutodiscoverService.svc/root/oauth/user [HTTP/1.1 401 Unauthorized 27ms] OPTIONS https://ey-ls01.company.de/WebTicket/oauthtoken [HTTP/1.1 400 Bad Request 27ms]
When I click on "Auth" I can see in Firefox that the Autodiscovery is working so far, but as you can see, after the first 401-response I get a 400-response which says "Bad request".
I think it´s because of the Same-Origin-Policy. I activated already the
Header set Access-Control-Allow-Origin "*"
Option on my XAMPP test machine, without any effect. Does anyone have an suggestions for me?
You are jumping from lync.company.de to ey-ls01.company.de.
lync.company.de should be your external web service FQDN and this should be getting hair-pinned through a reverse proxy so it can be port translated to the external web site running on 4443.
In a properly configured environment if you were hitting the external website, then the 401 should continue to direct you to the external web services FQDN. Since you are being directed to a different FQDN, it implies you are actually hitting the internal web services site.
这篇关于UCWA身份验证问题 - 401之后出现400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!