(RADIATOR) Problems with PostSearchHook in AuthLDAP2
Vangelis Kyriakakis
vkyriak at forthnet.gr
Fri Jun 11 03:13:28 CDT 2004
Hello Hugh,
my $attr = $_[2]->get('FTServiceId');
gave me the following error:
ERR: Error in PostSearchHook(): Can't locate object method "get" via
package "Radius::Radius" (perhaps you forgot to load "Radius::Radius"?)
at (eval 25) line 3, <DATA> line 283.
The one that finally worked was
my $attr = $_[2]->get_attr('ServiceId');
Thanks a lot for the hint about the _[2]
Regards
Vangelis
Hugh Irvine wrote:
>
> Hello Vangelis -
>
> You are adding the attribute to the request packet, but looking in the
> reply packet.
>
> You should use this:
>
> my $attr = $_[2]->get('FTerviceId');
>
> regards
>
> Hugh
>
>
> On 10 Jun 2004, at 18:54, Vangelis Kyriakakis wrote:
>
>> Hello,
>>
>> I'm using the following configuration:
>>
>> <AuthBy LDAP2>
>> .......
>> .......
>> AuthAttrDef FTServiceId,ServiceId,request
>> .......
>> ........
>> PostSearchHook file:"%D/test.pl"
>> </AuthBy>
>>
>> test.pl:
>> sub
>> {
>> my $attr = $_[4]->get('FTerviceId');
>> print "get attribute $attr\n";
>> }
>>
>> What I'm trying to do is to get the value of the ServiceId which is 5
>> (From the Trace 4: DEBUG: LDAP got FTServiceId: 5)
>>
>> but I always get
>> get attribute ARRAY(0x737894)
>>
>>
>> Which is the correct way to get the answer? I looked in the hooks.txt
>> and in some previous mails in the list but I cannot get the correct
>> result.
>>
>> Regards
>> Vangelis Kyriakakis
>> Forthnet S.A.
>>
>>
>>
>> --
>> Archive at http://www.open.com.au/archives/radiator/
>> Announcements on radiator-announce at open.com.au
>> To unsubscribe, email 'majordomo at open.com.au' with
>> 'unsubscribe radiator' in the body of the message.
>>
>>
>
> NB: have you included a copy of your configuration file (no secrets),
> together with a trace 4 debug showing what is happening?
>
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list