S*********t 发帖数: 78 | 1 简单的给讲讲怎么实现,比如用数据库 table 来存贮用户密码 role 等的。如何配置
,如何限制权限等。有简单的代码最好
谢谢 |
g*****g 发帖数: 34805 | 2 If you are doing web application, try Acegi, all you need to
is some xml configuration.
【在 S*********t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 简单的给讲讲怎么实现,比如用数据库 table 来存贮用户密码 role 等的。如何配置 : ,如何限制权限等。有简单的代码最好 : 谢谢
|
S*********t 发帖数: 78 | 3 I am using ejb3
it seems acegi does not support ejb3 .
配置
【在 g*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : If you are doing web application, try Acegi, all you need to : is some xml configuration.
|
t*******e 发帖数: 684 | 4 JAAS是low level API,vendors用的多,application developers一般用不到。JavaEE
specification没有cover存password的部分,所以这是vendor proprietary的。
tomcat,weblogic,websphere都有自己的一套办法,具体看你用那个web server了。用
acegi的话,就是portable的。 |
t*******e 发帖数: 684 | 5 Acegi is mostly an application-managed security framework. What you need is
container-managed security. |
m******t 发帖数: 2416 | 6
Acegi 2.0 sure does.
【在 S*********t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I am using ejb3 : it seems acegi does not support ejb3 . : : 配置
|
g*****g 发帖数: 34805 | 7 If you are using ejb, you can consider your container managed security,
it may not be portable.
【在 S*********t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I am using ejb3 : it seems acegi does not support ejb3 . : : 配置
|
t*******e 发帖数: 684 | 8
用JSR-250 common annotations的话,是可以的,
比如在spring config中用
="enabled" />
import javax.annotation.security.RolesAllowed;
@RolesAllowed({"ROLE_EDITOR"})
followed by Spring Bean method, or EJB method.
【在 m******t 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : Acegi 2.0 sure does.
|