Is “isUserInRole” method related to JAAS?

ぃ、小莉子 提交于 2019-12-11 19:35:41

问题


I've configured JAAS in glassfish 3.0 and used JDBCRealm for authenticating users. It's working properly and URL(s) are restricted. But the method #{facesContext.externalContext.isUserInRole('admin')} always returns false, even when the logged in user is admin.I've set "admin" for both "group name" in my database and for "role name" in the mapping file and the user is admin. What might be the problem?


回答1:


In a servlet container, isUserInRole is just a call to the underlying servlet method. I would double-check the role mappings in the deployment descriptor.



来源:https://stackoverflow.com/questions/5648562/is-isuserinrole-method-related-to-jaas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!