| import javax.security.auth.login.LoginException; | import javax.security.jacc.PolicyContext; | import javax.servlet.http.HttpServletRequest; | import org.jboss.portal.identity.auth.DBIdentityLoginModule; | | public class CRMDBIdentityLoginModule extends DBIdentityLoginModule { | | @Override | protected boolean validatePassword(String inputPassword, | String expectedPassword) { | // logger.info("inputPassword=="+inputPassword); | // logger.info("expectedPassword=="+expectedPassword); | HttpServletRequest request = null; | try { | request = (HttpServletRequest) PolicyContext | .getContext("javax.servlet.http.HttpServletRequest"); | } catch (Exception e) { | log.error(this, e); | throw new RuntimeException(e); | } | Object ssoSuccess = request.getAttribute("ssoSuccess"); | // logger.info("ssoSuccess=="+ssoSuccess); | if (ssoSuccess != null) { | return true; | } | return super.validatePassword(inputPassword, expectedPassword); | } | | | @Override | protected String createPasswordHash(String username, String password, | String arg2) throws LoginException { | return password; | } | } |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173502#4173502 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173502 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user