Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
On Tue, Jan 22, 2019 at 12:08:34PM +0530, Prabhat Kumar wrote: > Is there any function for username authentication? as we have for password > i.e. pv_www_authenticate(realm, passwd, flags) I guess your only option for now is to use KEMI and your favorite scripting language available there. > Also how can i modify username before authentication? We are talking about digest authentication (rfc 2617), changing the username will result in a failed hash. So I'm lost at what you are trying to accomplish. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
Is there any function for username authentication? as we have for password i.e. pv_www_authenticate(realm, passwd, flags) Also how can i modify username before authentication? Regards, Prabhat On Mon, Jan 21, 2019 at 8:11 PM Daniel Tryba wrote: > On Mon, Jan 21, 2019 at 06:55:32PM +0530, Prabhat Kumar wrote: > > How can i modify username before consuming credentials set in *$au* > > variable. I tried $au=$_s("xyz:"+$au); but it says "*read only pvar in > > assignment left side*" > > ERROR: bad config file (1 errors) > > $au is readonly. My workaround is to set $avp(au) and use that instead > of $au > > > I have also tried "*rewriteuser("xyz:$au");*" but its not working. > > rewriteuser is the same a $rU > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
On Mon, Jan 21, 2019 at 06:55:32PM +0530, Prabhat Kumar wrote: > How can i modify username before consuming credentials set in *$au* > variable. I tried $au=$_s("xyz:"+$au); but it says "*read only pvar in > assignment left side*" > ERROR: bad config file (1 errors) $au is readonly. My workaround is to set $avp(au) and use that instead of $au > I have also tried "*rewriteuser("xyz:$au");*" but its not working. rewriteuser is the same a $rU ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
How can i modify username before consuming credentials set in *$au* variable. I tried $au=$_s("xyz:"+$au); but it says "*read only pvar in assignment left side*" ERROR: bad config file (1 errors) I have also tried "*rewriteuser("xyz:$au");*" but its not working. Regards, Prabhat On Mon, Jan 21, 2019 at 4:44 PM YASIN CANER wrote: > Hello,, > there is a lot way to remove a header. if it is just a Header , > remove_hf() , if it is value then you can use exclude_hf_value(). > > load_credentials works after auth is done. check your configuration or > please , share log. > > > http://kamailio.org/docs/modules/5.2.x/modules/textopsx.html#textopsx.f.exclude_hf_value > > > http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf > > > Yasin CANER > > textops Module - Kamailio > <http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf> > Check if the method of the message matches the name. If name is a known > method (invite, cancel, ack, bye, options, info, update, register, message, > subscribe, notify, refer, prack), the function performs method ID testing > (integer comparison) instead of ignore case string comparison. > kamailio.org > > > -- > *From:* sr-users on behalf of > Prabhat Kumar > *Sent:* Monday, January 21, 2019 1:49 PM > *To:* Kamailio (SER) - Users Mailing List > *Subject:* Re: [SR-Users] Additional Param Check in ConsumeCredential Auth > > I have used load_credentials for loading email, but not able to consume > it. > > modparam("auth_db", "load_credentials", "$avp(email)=email_address") > > Also not able to access avp as it prints null > > Regards, > > Prabhat > > > > On Mon, Jan 21, 2019 at 12:40 PM YASIN CANER > wrote: > > Hello > > you can use load_credentials. After Auth is done , defined columns load to > avp. and you can use it. > > > > http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials > > Yasin CANER > > -- > *From:* sr-users on behalf of > Mojtaba > *Sent:* Monday, January 21, 2019 10:06 AM > *To:* Kamailio (SER) - Users Mailing List > *Subject:* Re: [SR-Users] Additional Param Check in ConsumeCredential Auth > > Hello Prabhat, > Would you look at this function pv_www_authenticate in auth module? It > seems it would be useful for you > You could use the email as authentication parameter too, > With Regards.Mojtaba > > > On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar < > prabhat.ku...@myoperator.co> wrote: > > Hi, > > I want to check additional param in Auth module. For. ex., other than > username and secret , i want to validate user by its email address. How can > i do that? > > Regards, > > Prabhat Kumar > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > -- > --Mojtaba Esfandiari.S > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
Hello,, there is a lot way to remove a header. if it is just a Header , remove_hf() , if it is value then you can use exclude_hf_value(). load_credentials works after auth is done. check your configuration or please , share log. http://kamailio.org/docs/modules/5.2.x/modules/textopsx.html#textopsx.f.exclude_hf_value http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf Yasin CANER textops Module - Kamailio<http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf> Check if the method of the message matches the name. If name is a known method (invite, cancel, ack, bye, options, info, update, register, message, subscribe, notify, refer, prack), the function performs method ID testing (integer comparison) instead of ignore case string comparison. kamailio.org From: sr-users on behalf of Prabhat Kumar Sent: Monday, January 21, 2019 1:49 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Additional Param Check in ConsumeCredential Auth I have used load_credentials for loading email, but not able to consume it. modparam("auth_db", "load_credentials", "$avp(email)=email_address") Also not able to access avp as it prints null Regards, Prabhat On Mon, Jan 21, 2019 at 12:40 PM YASIN CANER mailto:caner_y...@hotmail.com>> wrote: Hello you can use load_credentials. After Auth is done , defined columns load to avp. and you can use it. http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials Yasin CANER From: sr-users mailto:sr-users-boun...@lists.kamailio.org>> on behalf of Mojtaba mailto:mes...@gmail.com>> Sent: Monday, January 21, 2019 10:06 AM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Additional Param Check in ConsumeCredential Auth Hello Prabhat, Would you look at this function pv_www_authenticate in auth module? It seems it would be useful for you You could use the email as authentication parameter too, With Regards.Mojtaba On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar mailto:prabhat.ku...@myoperator.co>> wrote: Hi, I want to check additional param in Auth module. For. ex., other than username and secret , i want to validate user by its email address. How can i do that? Regards, Prabhat Kumar ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- --Mojtaba Esfandiari.S ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
I have used load_credentials for loading email, but not able to consume it. modparam("auth_db", "load_credentials", "$avp(email)=email_address") Also not able to access avp as it prints null Regards, Prabhat On Mon, Jan 21, 2019 at 12:40 PM YASIN CANER wrote: > Hello > > you can use load_credentials. After Auth is done , defined columns load to > avp. and you can use it. > > > > http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials > > Yasin CANER > > -- > *From:* sr-users on behalf of > Mojtaba > *Sent:* Monday, January 21, 2019 10:06 AM > *To:* Kamailio (SER) - Users Mailing List > *Subject:* Re: [SR-Users] Additional Param Check in ConsumeCredential Auth > > Hello Prabhat, > Would you look at this function pv_www_authenticate in auth module? It > seems it would be useful for you > You could use the email as authentication parameter too, > With Regards.Mojtaba > > > On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar < > prabhat.ku...@myoperator.co> wrote: > > Hi, > > I want to check additional param in Auth module. For. ex., other than > username and secret , i want to validate user by its email address. How can > i do that? > > Regards, > > Prabhat Kumar > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > -- > --Mojtaba Esfandiari.S > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
Hello you can use load_credentials. After Auth is done , defined columns load to avp. and you can use it. http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials Yasin CANER From: sr-users on behalf of Mojtaba Sent: Monday, January 21, 2019 10:06 AM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Additional Param Check in ConsumeCredential Auth Hello Prabhat, Would you look at this function pv_www_authenticate in auth module? It seems it would be useful for you You could use the email as authentication parameter too, With Regards.Mojtaba On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar mailto:prabhat.ku...@myoperator.co>> wrote: Hi, I want to check additional param in Auth module. For. ex., other than username and secret , i want to validate user by its email address. How can i do that? Regards, Prabhat Kumar ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- --Mojtaba Esfandiari.S ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Additional Param Check in ConsumeCredential Auth
Hello Prabhat, Would you look at this function pv_www_authenticate in auth module? It seems it would be useful for you You could use the email as authentication parameter too, With Regards.Mojtaba On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar wrote: > Hi, > > I want to check additional param in Auth module. For. ex., other than > username and secret , i want to validate user by its email address. How can > i do that? > > Regards, > > Prabhat Kumar > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > -- --Mojtaba Esfandiari.S ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users