在子域Forms身份验证 [英] Forms Authentication across Sub-Domains

查看:105
本文介绍了在子域Forms身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能当认证在一个子域,而不是父域发生来验证跨子域用户?

Is it possible to authenticate users across sub-domains when the authentication takes place at a sub-domain instead of the parent domain?

例如:

用户登录到site1.parent.com,然后我们需要把它们发送到reporting.parent.com。

User logs into site1.parent.com, and then we need to send them to reporting.parent.com.

我可以将它们进行身份验证,即使登录时发生一个子域报告站点?

Can I authenticate them to the reporting site even though the log-in occured at a sub-domain?

到目前为止,所有我也做了研究,得到了用户登录到父域,然后再各个子域访问身份验证Cookie。

So far all of the research I have done has users logging into the parent domain first and then each sub-domain has access to the authentication cookie.

推荐答案

您可以设置cookie是在认证时间父域,但你必须明确地设置它,它会默认你是在全域。

You can set the cookie to be the parent domain at authentication time but you have to explicitly set it, it will default to the full domain that you are on.

一旦身份验证cookie被正确设置到父域,则所有子域应该能够阅读它。

Once the auth cookie is correctly set to the parent domain, then all sub-domains should be able to read it.

这篇关于在子域Forms身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆