在子域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.