简体   繁体   English

在MVC 2中FormsAuthentication成功后如何生成身份验证令牌

[英]How to generate authentication token after FormsAuthentication success in mvc 2

I'm developing MVC 2 web application. 我正在开发MVC 2 Web应用程序。 I'm using FormsAuthentication for sign in users to my application. 我正在使用FormsAuthentication将用户登录到我的应用程序。 I want to generate an authentication token after users are successfully login to the application. 我想在用户成功登录到应用程序后生成身份验证令牌。 I have to pass that authentication token to another application. 我必须将该身份验证令牌传递给另一个应用程序。 Are there any best ways to accomplish this task using MVC2(.net framework 4.0). 是否有使用MVC2(.net framework 4.0)完成此任务的最佳方法。 Please help me to solve this problem. 请帮我解决这个问题。

At best, FormsAuthentication has a GetAuthCookie method which gets the cookie details for a logged-in user. 充其量, FormsAuthentication具有GetAuthCookie方法,该方法获取登录用户的cookie详细信息。 It's not really good for token-based authentication though. 但是,这对于基于令牌的身份验证确实不是很好。 You can, however, share the forms auth cookies across web applications. 但是,您可以在Web应用程序之间共享表单身份验证cookie。 There are restrictions involved, but here is some documentation ( and this for ASP.NET Core ) to help understand where to begin. 涉及到一些限制,但是这里有一些文档这对于ASP.NET Core来说 ),可以帮助您理解从何处开始。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MVC4-通过http POST和FormsAuthentication进行Android身份验证 - MVC4 - Android authentication via http POST and FormsAuthentication asp.net MVC FormsAuthentication用于基于声明的身份验证 - asp.net MVC FormsAuthentication for claim based authentication FormsAuthentication.SetAuthCookie被调用后,Forms Authentication cookie无法正常工作 - Forms Authentication cookie is not working after FormsAuthentication.SetAuthCookie is called 在FormsAuthentication对用户进行身份验证之后,撤消身份验证并重定向到登录页面 - Revoking authentication and redirect to login page after FormsAuthentication have authenticated the user WebForms FormsAuthentication - 身份验证后重定向导致登录页面再次调用 - WebForms FormsAuthentication - Redirect after authentication results in Login Page to be called again 会话身份验证等同于 FormsAuthentication? - Session Authentication equivalent to FormsAuthentication? MVC-FormsAuthentication获取RoleName - MVC - FormsAuthentication Get the RoleName ASP.NET MVC4身份验证成功,但是在项目构建后缺少角色 - ASP.NET MVC4 Authentication success but Roles are missing after project build FormsAuthentication:如何为特定的子目录/ MVC控制器指定不同的cookie名称? - FormsAuthentication: how to specify different cookie names for specific subdirectories/MVC controllers? 在MVC中发布JsonResponse成功后如何关闭对话框 - How to close dialog after posting JsonResponse success in MVC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM