我不明白谷歌如何实现以下单点登录机制:
第二个站点如何检测到我已经登录.它们是不同的域.Youtube无法读取Gmail的Cookie.
我读过的关于单点登录的所有解决方案都不允许这样做.客户端始终要求获得中央登录应用程序的权限.在我的示例中,YouTube不知道我是登录Gmail的用户(实际上它确实知道,但我不明白如何)
请注意,我手动输入"youtube"的网址.我没有从gmail的上方工具栏中取出youtube图标(在这种情况下,gmail可能会通过网址传递一些auth params).
我有两个蚂蚁文件:
1)主文件
Run Code Online (Sandbox Code Playgroud)<include file="otherFile.xml" as="otherFile"/> <target name="firstTarget"> <antcall target="otherFile.secondTarget"/> </target>
2)实用程序文件
<target name="secondTarget">
<antcall target="thirdTarget"/>
</target>
<target name="thirdTarget">
<echo message="ok"/>
</target>
Run Code Online (Sandbox Code Playgroud)
当我调用firstTarget它说它找不到thirdTarget.如果我改变secondTarget这种方式:
Run Code Online (Sandbox Code Playgroud)<target name="secondTarget"> <antcall target="otherFile.thirdTarget"/> </target>
然后它工作.但是我不能直接使用secondTarget.因为第二个文件没有创建前缀otherFile