根据我的要求,在MVC5应用程序中对用户进行身份验证的最佳实践是什么? [英] What is the best practices to authenticate users in MVC5 application with my requirements in here

查看:97
本文介绍了根据我的要求,在MVC5应用程序中对用户进行身份验证的最佳实践是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读Microsoft的不同文章,以找到在登录我的应用程序之前验证用户身份的最佳方法。但是,这些文章没有达到我的目的,所以我来到了这里。



我的要求:

我有一个维护用户详细信息的用户数据库,如-Email,UserName,Password,Active status等等当他注册时。注册时,电子邮件将发送给系统管理员,当管理员激活该用户时,只有用户才能登录。



此外,如果用户尝试访问未经登录无权查看的页面,则应将其重定向到登录页面。



满足我需要的最佳实践是什么?



我有什么试过:



使用ASP.NET MVC进行安全性,身份验证和授权Microsoft Docs [ ^ ]



试过这个链接但是现在我不需要任何这里所说的确认技术。

I have been reading different articles of Microsoft to find out the best way to authenticate users before login into my application. However, my purpose is not met by those articles so I landed up here.

My Requirement:
I have a database of users that maintain user details like -Email, UserName, Password, Active status and so on when he registers. On registering, email will be send to admin of the system and when admin makes that user active, then only user will be able to logon.

Also, if user tries to access pages that is not authorized to be seen without logins, he should be redirected to login page.

What is the best practices to fulfill me need???

What I have tried:

Security, Authentication, and Authorization with ASP.NET MVC | Microsoft Docs[^]

Tried this link but for now I do not need any of the confirmation techniques stated here.

推荐答案

您发布的其中一个链接出了什么问题?



使用登录,电子邮件创建安全的ASP.NET MVC 5 Web应用程序确认和密码重置(C#)| Microsoft Docs [ ^ ]



如果不这样做你想要什么,然后修改它,以便它。
What's wrong with one of the links you already posted?

Create a secure ASP.NET MVC 5 web app with log in, email confirmation and password reset (C#) | Microsoft Docs[^]

If it doesn't do what you want exactly then amend it so that it does.


这篇关于根据我的要求,在MVC5应用程序中对用户进行身份验证的最佳实践是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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