Apache的MyFaces的2.0身份验证和授权 [英] Apache MyFaces 2.0 authentication and authorization

查看:251
本文介绍了Apache的MyFaces的2.0身份验证和授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建一个具有登录系统web应用程序。
用户应该对数据库进行验证。
我想保存的UserRole会话 - 或有其他(更好)的方式

此外,还有用于用户访问的区域。
嘉宾区,
用户区域,
管理区。

现在的问题是。
我怎么能轻易实现与JSF2.0授权?
我不想要测试每个站点上,如果用户被允许存取权限的网站或不

有没有在web.xml或者faces-config.xml中的测试案例的配置?

有人能告诉我一个教程或样品code?

感谢和问候
veote


解决方案

您也可以看看选项(Framewroks)


  

      
  1. 春季安全

  2.   
  3. 阿帕奇四郎

  4.   
  5. 的Java EE安全教程

  6.   
  7. 作为已经建议Application Server提供身份验证/授权。

  8.   
  9. 实施过滤器(认证/授权定制土生土长的逻辑)

  10.   

博客涵盖全日空在JSF


  

      
  1. 用户会话过滤

  2.   
  3. 使用的PhaseListener访问控制JSF

  4.   

希望这有助于

I need to create a webapp that has a login system. the user should authenticate against a database. I want to save the userrole in session - or are there other (better) ways?

Furthermore there are areas for user access. Guest area, user area, admin area.

The question now is. How can I easily implement the authorization with jsf2.0? I don't want to test on each site, if the user is permitted to acces the site or not.

Is there a configuration in web.xml or faces-config.xml that test the cases?

Can someone show me a tutorial or sample code?

Thanks and best regards veote

解决方案

You can also look at options (Framewroks)

  1. Spring Security
  2. Apache Shiro
  3. Java EE Security Tutorial
  4. As already suggested Application Server provided Authentication/Authorization.
  5. Implement a Filter (Custom home grown logic for Authentication/Authorization)

Blogs covering AnA in JSF

  1. User session filter
  2. Access Control in JSF using a PhaseListener

Hope this helps

这篇关于Apache的MyFaces的2.0身份验证和授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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