Want to create your own Oracle APEX "Open Door" authentication scheme
Have you tried to use the Oracle APEX “Open Door Credentials” authentication scheme? You didn’t like the Login page but don’t know how to change it. This is exactly the situation I found myself in not too long ago so I have written this article to show you how to change the “Application Express Accounts” authentication scheme to behave like the “Open Door Credentials” scheme, and you can customize to your heart’s content. Follow the simple steps below and see for yourself.
Firstly, customize the Login page 101 by adding company logo, text or URL as desired assuming you have already created an APEX application.
Change P101_PASSWORD type from Password to Hidden because we just want to capture the username (P101_USERNAME) but don’t care about the password.
Go to the Processing section on page 101 and do not change the Set Username Cookie process.
At this point you will need to create a new APEX user account called APP109_USER (or any name you want) for authentication purpose so no individual APEX account is needed to run this application. It’s effectively the “Open Door Credentials” authentication concept.
If you don’t have the required privilege to create new APEX user account then ask your APEX administrator for assistance. Don’t forget to get the password.
Go back to page 101 Processing section and select the Login process. Modify the PL/SQL code to replace P101_USERNAME with the common user APP109_USER in the authentication package. Enter the appropriate password for APP109_USER and in this case it is ‘Year2017’.
Do not change the Clear Page(s) Cache process.
Ensure your application still uses the “Application Express Accounts” authentication scheme.
Here is the new look of the Login page and you can enter whatever you like in the Username field. Now you can share this application with anyone without needing an APEX user account.
If you want to reference the Username entered on the Login page then you will need to create an application level item called APP_USERNAME (or any name you like).
After creating the APP_USERNAME item go back to page 101 Processing section. Select the Login process and modify the PL/SQL to assign the value of P101_USERNAME to APP_USERNAME.
Run the application again and enter the desired user name to login.
I have modified the Home page to display APP_USER and APP_USERNAME so you can see the difference. APP_USER is the common user we use for APEX authentication so everyone will be logging in as APP109_USER in this example.
The LOGIN USER is the user name entered on the Login page and subsequently saved to the application item APP_USERNAME.
Here is the Home page displaying both authenticated user (APP_USER) and the login user name (APP_USERNAME). Both users are referenceable throughout the APEX application.
Hope you’d find this article useful.
Associate Lead Software Engineer at TSYS|Global Payments
7 年What if we want to use googleid or facebookid for authentication.How will we implement this?
Technology Product Owner - Enterprise Database
8 年Thanks Tommy. Very useful information.