<div dir="ltr">Can  anyone help me on the above issue please ? Still I am stuck on this .<div><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><i>Thanks & Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Senior Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 29, 2020 at 6:05 PM Sasmita Panda <<a href="mailto:spanda@3clogic.com">spanda@3clogic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi , <div><br></div><div>I am trying to do memory caching for authentication .  Followed the below link. </div><div><a href="https://www.opensips.org/Documentation/Tutorials-MemoryCaching" target="_blank">https://www.opensips.org/Documentation/Tutorials-MemoryCaching</a> </div><div><br></div><div>my DB looks like below . </div>| id | username | domain               | password | email_address | ha1 | ha1b | rpid |<br>+----+----------+--------------------------------------------+----------+---------------+-----+------+------+<br>|  1 | 7878     | <a href="http://fs-reg.i3clogic.com" target="_blank">fs-reg.i3clogic.com</a> | som123 |               |     |      | NULL |<br><div> <br></div><div>loadmodule "cachedb_local.so"<br>#loading auth module<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br><br>modparam("auth_db", "db_url", "mysql://root:cccl0g1c@localhost/opensips")<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "user_column", "username")<br>#modparam("auth_db", "use_domain", 1)<br>modparam("auth_db", "domain_column", "domain")<br>modparam("auth_db", "password_column", "password")<br>modparam("auth_db", "load_credentials", "$avp(55)=password")<br><br>modparam("auth","username_spec","$avp(54)")<br>modparam("auth","password_spec","$avp(55)")<br></div><div><br></div><div> if(cache_fetch("local","passwd_$tu",$avp(55))) {<br>                $avp(54) = $tU;<br>                if (!pv_www_authorize("")) {<br>                        # authentication failed -> do challenge<br>                        www_challenge("", "1");<br>                        exit;<br>                };<br>        } else {<br>                if (!www_authorize("", "subscriber")) {<br>                        # authentication failed -> do challenge<br>                        www_challenge("", "1");<br>                        exit;<br>                };<br>                # after DB authentication, the password is available<br>                cache_store("local","passwd_$tu","$avp(55)",1200);<br>        }<br></div><div><br></div><div><br></div><div>This thing I have done . While doing DB authentication its working , but which doing through memory caching its giving error "Incorrect Password" . Whats wrong I  am doing . please help me . </div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><b><i>Thanks & Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Senior Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div></div></div></div></div>
</blockquote></div>