没有密码的Asp.net Memebership授权

时间:2021-06-15 08:09:45

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

要在Asp.net成员身份中自动验证用户,我们可以调用方法

FormsAuthentication.Authenticate(username, password)

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

如何在没有用户密码的情况下完成相同的工作(生成会话,cookie和Authanticate所有其他工作人员)?

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.

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

1 个解决方案

#1


11  

I think you can use the SetAuthCookie method.

我想你可以使用SetAuthCookie方法。

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

更多信息,请访问http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.setauthcookie.aspx

#1


11  

I think you can use the SetAuthCookie method.

我想你可以使用SetAuthCookie方法。

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

更多信息,请访问http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.setauthcookie.aspx