share information between authorize and authenticate sections (rlm_perl & rlm_python)

Phil Mayers p.mayers at imperial.ac.uk
Thu Dec 13 13:05:23 CET 2012


On 12/12/12 22:04, laurent.feron at free.fr wrote:
> Hello,
>
> If someone can advise me...
> How to share information between the authorize() function and the authenticate() function within a perl or python script ?

Just set an attribute:

authorize {
   update request {
     Tmp-String-0 := "%{some:expansion}"
   }
   ...
}
authenticate {
   Auth-Type XXX {
     if (Tmp-String-0 == "a") {
       module_a
     }
     else {
       module_b
     }
   }
}

...re-work as appropriate for your use-case.


More information about the Freeradius-Users mailing list