public boolean authenticate() {
|
|
| log.info("authenticating #0", identity.getUsername());
| try{
| Usr usr = (Usr) em.createQuery("from Usr where bname = :bname and
passwort = :passwort")
| .setParameter("bname", Identity.instance().getUsername())
| .setParameter("passwort", Identity.instance().getPassword())
| .getSingleResult();
|
| if (usr.getRoles() != null) {
| identity.addRole( usr.getRoles());
| return true;
| }
| return false;
| } catch (NoResultException ex) {
| FacesMessages.instance().add("Benutzername/Passwort falsch!");
| return false;
| }
|
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026891#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...