Thanks for this help. It works now with the code below: public boolean
authenticate() {
| try {
| User user0 = (User) entityManager.createQuery(
| "from User where username = :username")
| .setParameter("username",
Identity.instance().getUsername())
| .getSingleResult();
| if ( !compareHash( user0.getHashedPassword(),
Identity.instance().getPassword() ) )
| {
| return false;
| }
|
| user = user0;
|
| if( user.getRoles() != null ) {
| for (UserRole r : user.getRoles())
|
Identity.instance().addRole(r.getName());
| }
| return true;
| }
| catch (NoResultException ex) {
| log.warn("Invalid username/password");
| return false;
| }
| }
Can anyone clarify why it fails with identity injected via @In--it used to work
before?
Thanks--Alex
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022432#4022432
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022432
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user