(RADIATOR) Stored Procedure (I m stuck)!!!

hakim hakim at kccg.net
Tue Aug 26 02:27:38 CDT 2003


hi Pavel!!!
Thanx for the reply. But if you dig the radiator mailing list, in one of the emails Mike has replied that Radiator expects a recordset to be returned.
Also the method you are suggesting if done that way, the user is always AUTHENTICATED even if the username and/or password is wrong.

I feel what I am doing wrong is binding of the variables OUT parameter (Cursor). 
Any feedback/help would be appreciated!!!
Regards
Hakim
---------- Original Message ----------------------------------
From: Pavel A Crasotin <pavel at ctk.ru>
Reply-To: Pavel A Crasotin <pavel at ctk.ru>
Date:  Tue, 26 Aug 2003 08:57:41 +0400

>Hello Hakim -
>
>There is no need to use cursors (it is possible but I dont think about
>it :)). 
>
>Just create sp_auth2 as
>
>procedure sp_Auth2(sUsername in varchar2,sPassword out varchar2)
>   is
>begin
>   select password
>      into sPassword
>      from authenticationtable_000 where
>      username=sUsername;
>exception
>    when others then
>                 null;
>end sp_Auth2;
>
>There is plsql.cfg it the goodies/ dir in Radiator distribution.
>Try to read it. Hope it helps.
>
>
>
>h> hello!!!
>h> What I am doing wrong here??? Any help would be appreciated!!!
>
>
>h> ----SAMPLE CONFIG FILE----
>h> Trace 4
>h> AuthPort 1812
>h> AcctPort 1813
>h> LogDir c:\Radiator3.6\dump
>h> DictionaryFile ./dictionary
>h> UsernameCharset a-zA-Z0-9\._ at -
>h> LogFile %L/%Y-%m-2logfile.log
>
>h> DefineFormattedGlobalVar dbSourceODBC tas_sys
>h> DefineFormattedGlobalVar dbSourceOracle tas
>h> DefineFormattedGlobalVar dbUsername xxx
>h> DefineFormattedGlobalVar dbAuth xxx
>
>h> <Client localhost>
>h> Secret mysecret
>h> DupInterval 300
>h> </Client>
>
>h> <SessionDatabase SQL>
>h> DBSource dbi:Oracle:tas3
>h> DBUsername xxx
>h> DBAuth xxx
>h> AddQuery        insert into RADONLINE (username,code) values ('%n','000')
>h> </SessionDatabase>
>
>h> <Handler>
>h> <AuthBy PLSQL>
>h>         NoDefault
>h>         DBSource dbi:Oracle:tas
>h>         DBUsername %{GlobalVar:dbUsername}
>h>         DBAuth %{GlobalVar:dbAuth}
>h>         AuthBlock  begin \
>h>                tasradius.sp_Auth2('%n',:sReturnValue); \
>h>                end;
>h>         AuthParamDef :sReturnValue,User-Password,Check
>h> </AuthBy>
>h> </Handler>
>
>h> ----END OF SAMPLE CONFIG FILE ---
>
>h> -----STORED PROCEDURE ---------
>h> CREATE OR REPLACE package tasradius
>h> is
>h> type Cursors is ref cursor return radreturn%rowtype;
>h> procedure sp_Auth2(sUsername in varchar2,sReturn out tasradius.Cursors);
>h> end tasradius;
>
>h> procedure sp_Auth2(sUsername in varchar2,sReturn out tasradius.Cursors)
>h> is
>h> begin
>h> open sReturn for select password from authenticationtable_000 where username='test';
>h> exception
>h>     when others then
>h>                  null;
>h> end sp_Auth2;
>h> end tasradius;
>h> ----- END OF STORED PROCEDURE ---------
>
>h> Regards
>h> Hakim
>h> ===
>h> Archive at http://www.open.com.au/archives/radiator/
>h> Announcements on radiator-announce at open.com.au
>h> To unsubscribe, email 'majordomo at open.com.au' with
>h> 'unsubscribe radiator' in the body of the message.
>
>
>With respect,
>Pavel A Crasotin
>____________________________________
>OJSC SeverTransCom
>Tel/Fax: +7 (0852) 58-01-00, 72-17-28
>
>===
>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