Posts

Showing posts with the label rest

Prototyping usage of an OAUTH API

Image
There are many services out there that offer an OAUTH2 API - whereby you get an access token, associated to your account, and you use that with requests rather than logging in each request. It's a solid design, because for one, you as a user can opt to grant permission to parts of the system, and for another you can easily revoke access to individual applications. One problem? It is fairly unlikely there is a client library built for PL/SQL or APEX use. For instance, Google provides libraries for[ 1 ]: Java JavaScript .NET PHP Python Objective-C Another example, Instagram provides[ 2 ]: Python Ruby It's not too hard to build it in PL/SQL once you understand the flow of OAUTH. I started working on one for Google services, which is hosted over on my GitHub profile. Before you get too far with that though, you may like to test the requests you are attempting to work with. The one's I have seen tend to provide an API test tool, however you may like to create...

Exposing procedures for URL access with ORDS

Image
I had just been looking at exposing some procedure for URL access, using ORDS. ORDS offers the following configuration properties: security.inclusionList security.exclusionList security.disableDefaultExclusionList security.validationFunctionType security.requestValidationFunction Which you can see on the docs: https://docs.oracle.com/cd/E37099_01/doc.20/e25066/config_file.htm#AELIG7204   If you look at the administrator guide:  https://docs.oracle.com/cd/E37097_01/doc.42/e35129/adm_mg_service_set.htm#AEADM209 it suggests pointing the validation function to: wwv_flow_epg_include_modules.authorize, and modifying the function: wwv_flow_epg_include_mod_local, within the APEX schema to return true or false depending if you want your procedure to be accessible or not. This unwrapped function is effectively called at the end of wwv_flow_epg_include_modules.authorize if none of the apex procedures matched. If you leave the value of security.requestVal...