通过Webservice进行DNN单点登录 [英] DNN single sign on through webservice

查看:149
本文介绍了通过Webservice进行DNN单点登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为DNN网站www.example1.com实现了SingleSignOn。还有一个名为www.example2.com的站点。这两个站点都将重定向到使用Web服务从外部数据库对用户进行身份验证的通用登录页面。

I have implemented SingleSignOn for my DNN site say www.example1.com. There is another site called www.example2.com. Both the sites will redirect to a common login page which uses a webservice to authenticate the users from external database.

问题是,当我单击example1中的登录按钮时。 com,用户将被重定向到通用sso登录页面,并且在成功通过身份验证后,他将被重定向回到原始站点。如果我打开一个新选项卡并输入example2.com的URL,则该用户尚未登录。

The problem is, when i clicks on login button in example1.com, the user will be redirected to common sso login page, and after successful authentication, he will be redirected back to the original site. If I opens a new tab and enters the url that example2.com, the user is not being logged in.

但是,如果我单击example2.com中的登录按钮, ,用户将自动登录。

But, if i clicks on login button in example2.com, the user is automatically getting logs in.

我要的是,当我在第一个标签中登录一个网站并在第二个标签中打开另一个网站时,页面加载仅应登录用户,而不是单击登录。

What I want exactly is, when I logs into one site in first tab and opens another site in the second tab, on the page load only the user should be logged in, but not on the login click.

如何处理此问题?感谢您的帮助。

How can I handle this issue ? Any help is appreciated.

推荐答案

我做了类似的事情。

您的数据库应该跟踪当前登录的用户。在重定向到通用登录页面之前,您应该检查用户是否已登录。example2.com在重定向到通用用户之前不会检查用户是否已登录登录页面。

Your database should track users currently logged in. Before you redirect to the common login page, you should check if the user is logged in. Your example2.com is not checking to see if the user is logged on before redirecting to the common login page.

这是我们的工作方式:


  1. 两个站点都必须检查重定向之前先输入Cookie /令牌

  2. 用户登录网站并通过身份验证

    • 将用户写入令牌数据库

    • 将令牌存储在过期的Cookie中


  • 如果用户未正确注销,则必须按设定的时间间隔清理令牌

这篇关于通过Webservice进行DNN单点登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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