Reputation: 219
I am trying to learn and understand Oracle APEX now a days and have a confusion about user Authentication process in an APEX application. When we create a new Authentication scheme of scheme type "Custom", there is a column called "Authentication Function Name" where we have to give the function name that will validate a username/password.
But on actual Login page, we can define another page process to do this validation.... so my question is which authentication function takes precedence? For example, I was looking in a pre-supplied sample application that the application is using a custom authentication scheme, this scheme defines "custom_auth" in "Authentication Function Name" ("custom_auth" is a stored function in the database), but in the login page of this application, there is a page process that does the actual authentication and this process calls a different function, like this:
wwv_flow_custom_auth_std.login (
P_UNAME => v('P101_USERNAME'),
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':1'
);
Now my question is, when a user enters his credentials and click the login button, which of the 2 functions is actually called? can somebody please help me and remove my confusion?
Thanks in Advance.
Upvotes: 1
Views: 1620
Reputation: 1
begin
apex_authentication.login(p_username => :P9999_USERNAME,p_password => :P9999_PASSWORD ); end;
Upvotes: 0
Reputation: 5565
Both of these functions are actually called. When user clicks login button, APEX executes page process with wwv_flow_custom_auth_std.login
, and this function calls your authentication function later. To be sure, create a table for logging and add in your function code that inserts a row in logging table. Then try to login and check table.
Upvotes: 1