Re: plpgsql freeradius authentication function

2010-10-23 Thread Kafui Akyea
infotag get aaa_avpair command but i am unable to retrieve the Username and Password from the returned values. Help will be very much appreciated. kafui On Tue, Oct 19, 2010 at 11:04 AM, Kafui Akyea wrote: > I have not changed the order of the default queries. Because for > users in ra

Re: plpgsql freeradius authentication function

2010-10-19 Thread Kafui Akyea
I have not changed the order of the default queries. Because for users in radcheck table it authenticates perfectly but for users who are not thats when i need to get an Access-Reject but i dont get anything at all. On Tue, Oct 19, 2010 at 1:18 AM, Alan DeKok wrote: > Kafui Akyea wr

Re: plpgsql freeradius authentication function

2010-10-18 Thread Kafui Akyea
This is what the freeradius debug looks like when i try to authenticate a user who is not valid. I dont get an Access-Reject. But for valid users the function works fine. radius_xlat: 'SELECT id,username,attribute,value,op FROM tryagain('7140949870','') as (id integer,username varchar,at

Re: plpgsql freeradius authentication function

2010-10-18 Thread Kafui Akyea
INTO users_rec * FROM radcheck WHERE username = your_name; end if; RETURN users_rec.username; END; $$ LANGUAGE plpgsql; Help will be very much appreciated On Mon, Oct 18, 2010 at 2:23 PM, Kafui Akyea wrote: > Alan, > > Thanks a lot that worked > > Kafui > > &

Re: plpgsql freeradius authentication function

2010-10-18 Thread Kafui Akyea
Alan, Thanks a lot that worked Kafui On Mon, Oct 18, 2010 at 11:52 AM, Alan DeKok wrote: > Kafui Akyea wrote: > > Hi > > > > I implemented this in the freeradius postgresql.conf file > > SELECT id,username,attribute,op,value > > That's the wrong order.

Re: plpgsql freeradius authentication function

2010-10-18 Thread Kafui Akyea
Hi I implemented this in the freeradius postgresql.conf file SELECT id,username,attribute,op,value FROM try('714094','') as(id integer,username varchar,attribute varchar,op character,value varchar); and implemented this function on the Postgres database server CREATE OR REPLACE FUNCTION t

plpgsql freeradius authentication function

2010-10-16 Thread Kafui Akyea
Hi I have a plpgsql function being called from freeradius to do authentication but i keep getting Access-Reject from radius although when i run the function without freeradius it works fine. Please find below the function and how i call it CREATE OR REPLACE FUNCTION try (your_name TEXT, tiger TEX