Posts

Showing posts with the label authorization

How to use two authentication type together - Oracle Application Express + Custom Database Authentication

This blog is about how you can use two different authentication scheme in one single custom authentication. For example, if I wanted my users to be authenticated from my custom database table, but at the same time I want few admin users - who are my application's super users (I might want to enable few extra options to them) and they are already my Application Express Users (can be a developer or administrator) and I wanted to authenticate both of them in a single authentication function. So, here I will need to achieve two things, Authenticate Function First check if the user is authenticated via APEX user's credentials. If not, the user is authenticated via My Custom authentication function. Authorization Function Check if logged in user is a valid Application Express user If not, the user is a regular database user. Following is a sample code block for authentication function: function my_multi_auth(   p_username in varchar2,   p_password in varchar2...

How to Evaluate Oracle APEX Authorization Scheme using Execute Immediate

Here is something new and interesting work-around I found out while working on validating apex authorization scheme using my custom pl/sql function. So, initially I used  APEX_AUTHORIZATION.IS_AUTHORIZED function to evaluate my apex authorization scheme. But, I found a limitation with the use of is_authorized function. When my custom function refereed in SQL query it will end up with giving following error message. ORA-14551: cannot perform a DML operation inside a query Now, I still needs to evaluate apex authorization scheme but on my own way, without using is_authorized. Following is an self explanatory function I ended up writing for. Please note that following block will only work for authorization type = " PL/SQL Function Returning Boolean", but it can be tweak around for other authorization type. function validate_apex_auth(p_app_id in number, p_auth_scheme_name in varchar2) return number as     l_return number := 0;     l_result boolean;...
My photo
Jaydip Bosamiya
I am Oracle APEX Consultant, Blogger and Integrator. All-rounder in building small, medium and enterprise applications. Extensive knowledge in various area of web-driven applications in Back-end (PL/SQL, SQL, Java), Front-end (Oracle APEX, HTML, JavaScript, CSS, jQuery, OracleJET, ReactJS), RESTful APIs, Third-party library integrations (Apex Office Print (AOP), Payment Gateways, Syncfusion, HighCharts) and APEX Plugins (HighChart, StarRating)