Asp.net Memebership授权无密码 [英] Asp.net Memebership Authorization without password

查看:168
本文介绍了Asp.net Memebership授权无密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Asp.net成员资格中的authantate用户,我们可以调用方法

  FormsAuthentication.Authenticate(username,password)
如果没有用户密码,我该怎么做相同的工作(生成会话,Cookie和所有Authanticate的其他工作人员)?



我试图通过Facebook连接登录用户。用户的Facebook ID存储在用户数据中。用户应该像普通用户一样登录。

解决方案

我想可以使用SetAuthCookie方法。
$ b

更多信息在这里 http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.setauthcookie.aspx


To authanticate users in Asp.net Membership we can call method

FormsAuthentication.Authenticate(username, password)

how can I do the same job (generate session, cookies and all other staff that Authanticate does) without users password?

I'm trying to login user over facebook connect. User's facebook id is stored within the users data. User should be signed in like a normal user.

解决方案

I think you can use the SetAuthCookie method.

more info here http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.setauthcookie.aspx

这篇关于Asp.net Memebership授权无密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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