【发布时间】:2011-02-03 21:42:13
【问题描述】:
在 Spring security 3 中 - 我可以声明性地定义一个默认权限,以分配给使用 jdbc 身份验证提供程序进行身份验证的所有经过身份验证的用户吗?目前我的 webapp 没有角色的概念(也不会 - 您要么是允许访问您的帐户的用户,要么不是),我不想在我的数据库中实现权限表,因为它是多余的。目前通过以下声明,我收到以下错误消息。
消息 [表“权限”不 存在];
<authentication-manager>
<authentication-provider>
<password-encoder hash="plaintext"/>
<jdbc-user-service data-source-ref="dataSource"
users-by-username-query="select account_uid,hashedpassword,true from account where account_uid=?" />
</authentication-provider>
</authentication-manager>
如果这不能以声明方式完成 - 最好的方法是什么?
提前致谢,
伊恩。
【问题讨论】:
标签: authorization spring-security