Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Authentication scheme doesn't work - invalid login credentials

jerry44Aug 14 2014 — edited Aug 16 2014

I created custom autentication scheme in my application.

here is my authentication function:

create or replace FUNCTION autoryzacja (p_username in VARCHAR2, p_password in VARCHAR2)

return BOOLEAN

is

v_pwd_baza varchar2(4000);

v_liczba number;

begin

select count(*) into v_liczba from UZYTKOWNICY where upper(login) = upper(p_username);

if v_liczba > 0 then

select password into v_pwd_baza from UZYTKOWNICY where upper(login) = upper(p_username);

if p_password = v_pwd_baza then

return true;

else

return false;

end if;

end;


below is SQL of table UZYTKOWNICY (USERS):


CREATE TABLE  "UZYTKOWNICY"

   (    "ID_UZYTK" NUMBER(10,0) NOT NULL ENABLE,

    "LOGIN" VARCHAR2(20),

    "PASSWORD" VARCHAR2(20),

    "ID_GRUPY" NUMBER(2,0),

     CONSTRAINT "UZYTKOWNICY_PK" PRIMARY KEY ("ID_UZYTK") ENABLE

   ) ;

In settings of authentication scheme in section "Authentication Function" is: return autoryzacja;

I don't know where is my mistake.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2014
Added on Aug 14 2014
9 comments
2,696 views