[OpenSIPS-Users] pv_proxy_authorize cache

Mike Tesliuk mike at wsu.com.br
Mon Jul 24 16:21:38 EDT 2017


Hello there,


Im trying to implement a proxy_authorize using cache without success.


is that possible to perform the cache using proxy_authorize ? on the
example [1] i see the www_challenge() no proxy_challenge, is that correct ?


on my test im doing this (below):


modparam("auth","username_spec", "$avp(usuario)")
modparam("auth","password_spec", "$avp(senha)")
modparam("auth_db", "load_credentials", "$avp(senha)=password")


$avp(usuario) = $fU;

if(cache_fetch("redis","passwd_$fU",$avp(senha))) {
	if(!pv_proxy_authorize("")){
		proxy_challenge("","0");
		exit;
	}
}else{
	if(!proxy_authorize("")){
		proxy_challenge("","0");
		exit;
	}

	
	cache_store("redis","passwd_$fU","$avp(senha)",3600);

}

But with this rule i do not get the user authenticated.

what im doing wrong ? :)


Thanks in advice 




[1] - https://www.opensips.org/Documentation/Tutorials-MemoryCaching#toc3

-- 


​Atenciosamente,
WSU TECNOLOGIA
Mike Tesliuk
Rua Visconde do Rio Branco 1630 . Sala 1302 . Curitiba . PR  
12387 SW 125th ter, Miami, Florida 33186 - USA
tel +55 (41) 3941.0650   +1 (786) 719.6253
*website <http://www.wsu.com.br/>  |  mapa
<https://www.google.com.br/maps/place/WSU+Tecnologia/@-25.4354389,-49.2779048,17z/data=%213m1%214b1%214m2%213m1%211s0x94dce473a24cf705:0x369fdf05247b568b?hl=pt-BR>  |  email
<mailto:contato at wsu.com.br>    *
.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170724/e0931a85/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: OpenPGP digital signature
URL: <http://lists.opensips.org/pipermail/users/attachments/20170724/e0931a85/attachment-0001.sig>


More information about the Users mailing list