passing password through spring security to dao object

穿精又带淫゛_ 提交于 2019-12-06 07:27:29
Marcus

Ok, after carefully reading the Spring Security reference documentation I understand.

The thing is that Spring Security compares username and password from UserDetails returned from function UserDetailsService.loadUserByUsername with j_username and j_password field. It means that the DAO object should return the UserDetails with set fields username and password.

The answer to question about nullable SecurityContextHolder.getContext().getAuthentication() is that after successful authentication the SecurityContextHolder.getContext().getAuthentication() should return not-nullable object.

Regards

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