Hi,
I'm using the Acegi Security.
I have a problem because the authentification in my company is outsourced with a WebService.
This WS have 2 arguments : login and password.
I would like to get the current password(sPassword in the example) into the loadByUserName(String login) method of my own class UserDetailsService, where userManagerService call my authentification WS :
I don't have any access to the LDAP directory.Code:... public UserDetails loadUserByUsername(String login) { logger.info("Trying to Load the User with login: " + login + " and password PROTECTED from database and LDAP directory"); try { logger.info("Searching the user with login: " + login + " in database"); UserMetierImpl user = userManagerService.authenticateAndHabilitate(login, sPassword); ... logger.debug("Create User for acegi features for User with login: " + login); org.acegisecurity.userdetails.User acegiUser = new org.acegisecurity.userdetails.User( login, user.getPasswordUser(), true, true, true, true, arrayAuths); logger.info("user with login: " + login + " authenticated"); return acegiUser; } catch (DataAccessException e) { logger.error("Cannot retrieve Data from Database server : " + e.getMessage() + ". Authentication failed for user " + login); throw new UsernameNotFoundException("user not found", e); } }
Someone know how can I do ?
Thanks in advance,
Denis



(sPassword in the example) into the loadByUserName(String login) method of my own class UserDetailsService, where userManagerService call my authentification WS :
Reply With Quote