简体   繁体   English

通过jquery验证到第三方网站?

[英]authenticate to a 3rd party site with jquery?

I have a simple login form that lets users log into my website. 我有一个简单的登录表单,可以让用户登录我的网站。 Once logged in, there is a 3rd party site that I link which users can access and run searches on (its a database resource that we are partnered with). 登录后,将链接一个第三方网站,用户可以访问该网站并在其中进行搜索(与我们合作的数据库资源)。 The problem is in order to access that 3rd party database they first have to log in to THAT site with a simple passphrase (which is the same for every user) and get a cookie. 问题在于,为了访问该第三方数据库,他们首先必须使用简单的密码(对于每个用户都相同)登录到该网站并获取Cookie。

I'd like to simplify the whole process by running a jquery $get call to that 3rd party website when users sign in to my website so that they are authenticated with that 3rd party cookie and can seamlessly accesses the 3rd party database. 我想通过在用户登录到我的网站时运行到该第三方网站的jquery $ get调用来简化整个过程,以便他们通过该第三方Cookie进行身份验证并可以无缝访问第三方数据库。 Is that possible? 那可能吗?

Such a call won't work due to preventing loading from third-party sites ('same origin policy'), but what about a simple, hidden iframe? 由于阻止了第三方网站的加载(“相同来源策略”),因此无法进行此类调用,但是简单的隐藏式iframe呢? Since you said you would use a get call, you should be able to make the same request from their browser in an iframe that is hidden. 既然您说过要使用get调用,那么您应该能够在隐藏的iframe中从他们的浏览器发出相同的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM