I'm trying to add a
name-value pair to a request just before authentication occurs. The
documentation of radiator has an example:
<Realm>
PreAuthHook sub {
$_[0]->add_attr('test-attr', 'test-value'); }
<AuthBy LDAP>
...
<AuthBy>
</Realm>
Without the PreAuthHook,
everything is working fine, but when I run a test with this statement, the
logfile says:
ERR: Error in PreAuthHook(): Can't call
method "add_attr" on unblessed reference at (eval 190) line
1.
I tried to put PreAuthHook on different
places, but no luck. I also tried code like
PreAuthHook sub
{ my($p); \
bless($p); \
$_[0]->add_attr('test-attr', 'test-value'); }
but then the logfile says it cannot reach
class through "Handler.pm". I tried "use Radius::AttrVal" on
top of "Handler.pm" but that didn't work either.
Can anyone tell me what it is I'm missing
(besides this running) ?
-
Wilbert
|
- Re: (RADIATOR) PreAuthHook: add_attr -> can't call add... Wilbert de Graaf
- Re: (RADIATOR) PreAuthHook: add_attr -> can't cal... Mike McCauley