[RADIATOR] MySQL Authentication from two possible fields
Adam Gerson
agersonl at cgps.org
Mon Jun 7 11:16:53 CDT 2010
I considered something like this. However, don't I also need an
AuthColumnDef line to tell Radiator to take the result of the query and
match it to something?
In your proposed query if they are using their wireless card, it will
return the wired MAC in column 0, which will not match the wireless MAC
that was passed in against
AuthColumnDef 0, User-Name, check
--
Adam Gerson
Assistant Director of Technology
Columbia Grammar and Prep School
phone. 212-749-6200 ex. 321
fax. 212-428-6806
agerson at cgps.org
http://www.cgps.org
On 6/7/10 10:57 AM, Dominic J. Eidson wrote:
> If you want, you can make the SQL query as complex as you want, and do
> it all in one SELECT statement:
>
> An attempt at yours:
> AuthSelect SELECT REPLACE(mac_address,'.','') from computers where
> REPLACE(mac_address,'.','') = '%{User-Name}' OR
> REPLACE(alt_mac_address,'.','') = '%{User-Name}'
>
> Here is our AuthSelect:
> AuthSelect SELECT %0 AS "Password" FROM inv_node t1 WHERE t1.node_mac =
> replace(%0, ':', '') AND t1.node_wireless = 1 AND t1.node_enable = 1 AND
> now() BETWEEN t1.date_active AND t1.date_expire AND (t1.date_purged
> ISNULL OR t1.date_purged > now());
>
>
> - d.
>
More information about the radiator
mailing list