简体   繁体   English

认证与授权

[英]Authentication v/s Authorization

How the process Authentication is differ from authorization? 身份验证与授权有何不同? In my winforms application with c# and mySQL I have a login page for validating an user, then shows the admin page if the user is admin and user home if he is not an admin, Actually what we are doing through a process of login? 在使用c#mySQL winforms应用程序中,我有一个用于验证用户的登录页面,如果用户是admin,则显示管理页面;如果不是管理员,则显示用户home,实际上,我们通过登录过程正在做什么? whether it is authorizing or authenticating an user? 是授权还是认证用户?

Authentication: The process of a user, authenticating(Log In) themselves to a system to use the features provided. 身份验证:用户在向系统进行身份验证(登录)以使用提供的功能时进行的过程。

Authorization: Being authorized to, for instance, see a specific page of your application. 授权:例如,被授权查看您应用程序的特定页面。

Quick example: If a user logged in to your system, and they are authenticated as a user with user permissions, you will not allow them to see your admin pages, since the user does not have the same authorization as a Admin in your application. 快速示例:如果用户登录到您的系统,并且经过身份验证为具有用户权限的用户,则您将不允许他们查看您的管理页面,因为该用户与应用程序中的管理员没有相同的授权。

In your scenario, when the user logs in, it is the process of authentication. 在您的方案中,当用户登录时,这是身份验证的过程。

in short 
 when you try to login is Authentication (verify user by his identity like login credential)

after successful login user have some authority(like admin can change everything and user can only view they can add or edit some thing depends on access) is called Authorization 成功登录后,用户具有某些权限(例如admin可以更改所有内容,并且用户只能查看他们可以添加或编辑某些内容取决于访问权限)称为授权

The first process , the process of validating an user is called authentication where we check whether such an user with some user id and password is belongs to our database. first process ,即验证用户的过程称为身份验证,其中我们检查具有某些用户名和密码的该用户是否属于我们的数据库。

The second process , based on the type of user or the level of user in the hierarchy we are disable or enables some/few pages and/or redirecting to admin home/user home these processes are called Authorization. second process基于用户的类型或层次结构中的用户级别,我们将禁用或启用某些/少量页面和/或重定向到管理主页/用户主页,这些过程称为授权。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM