(RADIATOR) Complex AuthSelect Query

Toomas Kärner tomkar at estpak.ee
Tue May 24 08:56:07 CDT 2005


Hi,

You can do it like this:

AuthBy that checks the flag:
<AuthBy SQL>
        Identifier      AuthFlag
        AuthSelect      select FLAG from plaah where yyy
        AuthColumnDef   0,      Auth-Type, check
</AuthBy>

And then you have different AuthBy indentifiers to different return flags:
<AuthBy SQL>
        Identifier      X
        AuthSelect      AuthSelect SELECT
RTRIM(PASSWORD),RTRIM(STATICIP),RTRIM(ROUTE),RTRIM(MAXCONNECT) FROM USERS
</AuthBy>
<AuthBy SQL>
        Identifier      Y
        AuthSelect      AuthSelect SELECT
RTRIM(PASSWORD),RTRIM(STATICIP),RTRIM(ROUTE),RTRIM(MAXCONNECT) FROM USERS
</AuthBy>


----- Original Message ----- 
From: "Cem SEN" <cem at doruk.net.tr>
To: <radiator at open.com.au>
Sent: Tuesday, May 24, 2005 1:29 PM
Subject: (RADIATOR) Complex AuthSelect Query


> Hello All,
>
> I need your ideas/helps for the following situation. I am using radiator
> 3.11 with an oracle db.
> In the AuthSelect section of AuthBy Sql i have such a stirng that works
> fine:
>
> AuthSelect SELECT
> RTRIM(PASSWORD),RTRIM(STATICIP),RTRIM(ROUTE),RTRIM(MAXCONNECT) FROM USERS
> where etc,....
> The problem is, i need to make a more complex query using if/else/then
> statements.Such as;
>
> -- if one of the flags in the database related to that username is equal
to
> x then process following line
>
> AuthSelect SELECT
> RTRIM(PASSWORD),RTRIM(STATICIP),RTRIM(ROUTE),RTRIM(MAXCONNECT) FROM USERS
>
> -- if one of the flags in the database related to that username is equal
to
> y then change flag to x then bla bla bla and then process following line
>
> AuthSelect SELECT
> RTRIM(PASSWORD),RTRIM(STATICIP),RTRIM(ROUTE),RTRIM(MAXCONNECT) FROM USERS
>
> Is it possible to make such configuration in the radius.cfg file or is
there
> a way for having it done by an external query string?
>
> Thanks In Advance
>
> Cem SEN
>
> --
> 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.

--
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