I have a table having the columns login_id and password. Now I want to create a Database Application in Apex where the authentication process should use the login_id and password column. Can you please help me how I can achieve this? I have also written a PL/SQL code/function for this, but not able to understand where I can put this code.
Thanks in advance !!!!!!
Have you searched this forum for "Custom Authentication" ? If not, I suggest you do a search first.
Also take a look at http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/sec_authentication.htm#HTMDB28966
Thanks Prabodh for your quick response. I have already checked the link. But very brief description is there which is not helpful/enough for me.
Three columns are present in the table: LOGIN_ID, PASSWORD and SUPERVISOR_FLAG. User can login if login id and password will match with the preentered data in the table and having SUPERVISOR_FLAG = 'N'. I have written the PL/SQL code below:
CREATE OR REPLACE FUNCTION asignee_authentication (P101_USERNAME in varchar2, P101_PASSWORD in varchar2) return boolean
select SUPERVISOR_FLAG into l_supervisor_flag from LKP_COE_RESOURCE
where LOGIN_ID = P101_USERNAME
and PASSWORD = P101_PASSWORD;
if l_supervisor_flag = 'N' then
But I can't understand where I have to put this for work. Please have a look at this.
Please read the documents carefully, and follow the instructions verbatim.
E.g the auth function MUST have p_username and p_password as parameters. You are not free to choose any other names for the parameters.
There are many thread on this forum that give almost step by step instructions, search and go through them as well.
The Auth function is to be created in the database, through SQLPlus or SQL Dev or some such tool, in the first provisioned schema of the workspace.
Maybe you need to first brush up SQL/PL/SQL before jumping into the deep end of Apex?
You need to use this function in your current authentication scheme, it is always recommended to create custom authentication in these kind of situations.
You can create a copy of current current authentication scheme and edit it under
Shared components > Authentication Schemes > Authentication Function > replace existing value with return asignee_authentication > and make this as your current authentication
I have read the thread that you have mentioned. But that was for web application(creating a demo web app, I have tried the instructions as you mentioned and it worked !!!), I have the exactly same requirement for a database application.
Can you please help me out. Appreciate your help.