Jump to content
We've recently updated our Privacy Statement, available here ×

akshathajcta

Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. akshathajcta's post in Jasperserver Customizing external authentication password validation was marked as the answer   
    I found answer. Created my own password validation function,placed it inside WEB-INF/lib/customized.jar file, and called that function from applicationContext-externalAuth-db.xml as below.

        <bean id="passwordValidator" class="org.springframework.security.providers.encoding.CustomizedMd5PasswordEncoder">
            <property name="encodeHashAsBase64"><value>false</value></property>
        </bean>

    Pasting my customized java function,

        package org.springframework.security.providers.encoding;

        import org.springframework.security.providers.encoding.Md5PasswordEncoder;


        public class CustomizedMd5PasswordEncoder extends Md5PasswordEncoder
        {
         public boolean isPasswordValid(String encPass, String rawPass, Object salt)
         {
             String[] pass1 = encPass.split(":");
             if(pass1.length != 2)
                 return false;
             String encResult= encodePassword(pass1[1]+rawPass, salt);
             if(encResult.equals(pass1[0]))
                 return true;
             else
                 return false;

              /* Above function is for my requirement, please make appropriate changes as you need*/
        }
        }

    Refer below url for detail steps,

    http://community.jaspersoft.com/questions/817932/passwordvalidator-smd5


    Thanks
×
×
  • Create New...