ASP.Net跨站身份验证 [英] ASP.Net Cross-Site Authentication

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

问题描述

我在使用表单domain1.com验证一个网站。

I have a website using Forms Authentication on domain1.com.

我一直在问怎么一个登录页面可以domain2.com它记录用户到domain1.com,并将其重定向到domain1.com主页(domain2.com没有会员制,纯粹是一种替代网页开发从登录到domain1.com)。

I've been asked how a login page can be developed on domain2.com which logs the user into domain1.com and redirects them to the domain1.com homepage (domain2.com has no membership system and is purely an alternative page to log in to domain1.com from).

这是可能的开箱或者我需要制定domain1.com一个网页,其中认证来自domain2.com?

Is this possible out of the box or would I need to develop a page on domain1.com which authenticates the login request from domain2.com?

推荐答案

是的,你可以重复使用的身份验证页面。创建domain2.com形式指着domain1.com

Yes, you can reuse the auth page. Create a form in domain2.com pointing the auth uri in domain1.com

W3Schools的:

动作的可能值
  属性是:

the possible values of the action attribute are:


      
  • 绝对URL - 指向另一个网站(如
      行动=htt​​p://www.example.com/example.htm)

  •   
  • 系统相对URL - 指向一个网站中的文件(如
      行动=example.htm)

  •   

更新:
我假设你想只得到验证为域1的网页。虽然你从DOMAIN2发送的凭据,你可以发布您的数据和被重定向到DOMAIN1。所以AUTH的cookie将只适用于这样的领域(域1)。

UPDATE: I'm supposing you want to only get authenticated for the pages of domain1. although you're sending the credentials from the domain2, you're POSTING your data and being redirected to domain1. so the auth cookie will only be valid for such domain (domain1).

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

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