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!

Custom Auth Scheme

926190Apr 30 2012 — edited May 1 2012
Dear community,

I have tried to create a custom auth scheme based on a tutorial. But seemed to fail since the tutorial works on version 4.0 and I work on 4.1.

Step 1. create table user_repository(
username varchar2(8),
password varchar2(8),
primary key (username)
);

Step 2. insert into user_repository values('john', '1234');

Step 3.

create or replace package pkg_auth as
function authenticate(p_username in varchar2,
p_password in varchar2) return boolean;
end;

create or replace package body pkg_auth as
function authenticate(p_username in varchar2,
p_password in varchar2) return boolean is
v_result integer := 0;
begin
select 1
into v_result
from user_repository
where username = lower(p_username)
and password = p_password;
return(v_result = 1);
exception
when no_data_found then
return false;
end authenticate;
end;

Step 4. They want me to create a authentication scheme from scratch, which does not exist in 4.1 ( so it fails pretty much from here already ). I created a normal (based on some default configs) auth scheme.

Step 5. They want me to fill this in the "Custom Function to authenticate": return pkg_auth.authenticate;
Unfortunenately this feature isnt there either.


Theyre talking about passhashing after, which wont work since I dont even get the normal auth scheme to work.
If anyone could help me out creating a custom auth scheme based on table in *4.1*, that wouldve been awesome.
This post has been answered by Scott Wesley on Apr 30 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2012
Added on Apr 30 2012
4 comments
213 views