使用会话的自定义表单身份验证 [英] custom form authentication using sessions

查看:79
本文介绍了使用会话的自定义表单身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用会话来进行自定义表单身份验证使用角色吗..以便管理员和用户拥有自己的页面..我是为一个可以登录到常见的安全aspx页面的用户执行此操作的.但不适用于具有角色

can we use sessions for custome form authentication use roles.. so administrators and users have dere own page.. i did it for for one user which can login in dere common secure aspx page. but not for the users having roles

推荐答案

''dere''的用户.

是的,当然可以.实际上,会话就是您希望在Web应用程序中存储用户角色的方式.因此,如果您知道应该使用什么,为什么不尝试使用它呢?它的工作原理如此明显,以至于您什至无法尝试,那么编写安全应用程序的人就是错误的人.登录时,您将角色存储在会话中,然后页面会根据角色检查会话值,以决定允许某人看到的内容.
''dere'' is not a word.

Yes, of course you can. In fact, the session is THE way you''d expect to store the role of a user in a web application. So, if you know what you should use, why not try to use it ? How it would work is so obvious, that if you can''t even try, you''re the wrong person to be writing a secure application. On login, you store the role in the session, and the pages check that session value to decide what a person is allowed to see, based on role.


这篇关于使用会话的自定义表单身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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