Authentication function not working in APEX but works in pl/sql

Greetings, Jim here.
I have written a very simple authentication funtion which uses the dbms_ldap package to authenticate using the userid and password from the login page.
I've tested this function thru pl/sql and it returns true and false accordingly.
I've created a custom authentication schema and in the authentication function I have return myfunction;
The problem is, when called thru APEX, it appears to always return true and lets the login proceed, even if the password is correct. I know its using the function due to the fact that if I enter a bogus function as the authentication function, APEX spits up a message saying so.
So, I know the function works, but I don't know why it does not work with APEX. Posting function below.
CREATE OR REPLACE FUNCTION ODBS.CUSTAPEXLOGIN (p_username IN VARCHAR2,p_password IN VARCHAR2)
RETURN BOOLEAN AS
retval PLS_INTEGER;
emp_session DBMS_LDAP.session;
ldap_host VARCHAR2(256);
ldap_port VARCHAR2(256);
ldap_user VARCHAR2(256);
ldap_passwd VARCHAR2(256);
ldap_base VARCHAR2(256);
BEGIN
ldap_host := 'oraldap';
ldap_port := '389';
ldap_user := p_username;
ldap_passwd := p_password;
ldap_base := 'cn=users,dc=company,dc=com';
emp_session := DBMS_LDAP.init(ldap_host,ldap_port);
retval := DBMS_LDAP.simple_bind_s(emp_session,('cn=' || ldap_user || ',' || ldap_base),ldap_passwd);
if retval = 0 then
return true;
else
return false;
end if;
EXCEPTION
WHEN OTHERS THEN
begin
if sqlcode = -31202 then
return false;
end if;
end;
END;
/

Hi Jim,
Can you clarify this -
The problem is, when called thru APEX, it appears to always return true and lets the login >proceed, even if the password is correctThat implies you're saying your authentication function ALWAYS returns true? Is that correct? Also 'even if the password is correct' doesn't read correctly to me, did you mean 'even if the password is incorrect'?
You then say -
now the function works, but I don't know why it does not work with APEX.So by 'does not work' you mean in APEX it is always returning true therefore allowing you to login regardless of the username/password you use? Is that correct?

Similar Messages

  • People picker is not working for ie11 but working fine for other lower version

    i am using sharepoint 2010 and windows authentication
    recently i have updated my ie to ie11 and problem goes here.
    when i try to select from people picker, there are an unexpected error happened 
    however when i use other ie version, people picker work fine, what goes wrong?
    i have already added my system as trusted site
    if there any others thing i miss out?

    Hi,
    According to your post, my understanding is that People picker is not working for ie11 but working fine for other lower version.
    IE 11 is known to have compatibility issues on SharePoint 2010, please make sure to:
    first of all, try installing latest update for IE 11 (several compatibility issues were fixed since the first release)
    add the site to compatibility view (in IE> Tools> Compatibility view settings> type site name> add)
    add the site to trusted sites and set the zone security level to low (in IE> Internet Options> Security> trusted sites> sites>add your site there> ok> custom level> select low> reset> ok)
    You can use developer tools (f12) and set browser mode to the version that is most compatible with your environment.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • My keyboard is not working in "Pages" but works with all other applications.  Please provide resolution advice.

    My keyboard is not working in "Pages" but works with all other applications.  Please provide resolution advice.

    What version of Pages?
    There are one or two of us here who are not intimately acquainted with your particular set-up.
    Peter

  • I have a Mac running 10.9.2. My wireless mouse with not scroll in mail but works fine in other applications? Any suggestions?

    I have a Mac running 10.9.2. My apple wireless mouse will not scroll in Mail but works fine in other applications.
    Any suggestions?

    First, see this discussion. If the solution suggested there doesn't work for you, continue.
    If you've installed a Mail plugin called "Mail Unread Menu" and you know how to remove it, please do that, then quit and relaunch Mail. Test. Otherwise, see below.
    Back up all data.
    1. Triple-click anywhere in the line below on this page to select it:  
    ~/Library/Mail/Bundles
    Right-click or control-click the highlighted line and select 
    Services ▹ Open
    from the contextual menu.* A folder may open, or you may get an error message that the item can't be found. Either result is normal. If the folder does open and has contents, move the contents to the Desktop. Relaunch Mail and test. If there's no change, put the contents of the folder back and quit Mail again.
    2. Repeat with this line:
    /Library/Mail/Bundles
    This time you may be prompted for your login password when you remove the items. Make sure they're removed from the folder and not just copied to the Desktop. If necessary, copy them first and then move the originals to the Trash.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • Motion tracking is not working for videos but works for images?

    Motion tracking is not working for videos but works for images. When the videos is drop onto the tracking object the videos corner don't appear highlighted. I am working on windows 7 with version 13.1.

    ivanhoeeurope
    Are you within 30 days of purchase for the Premiere Elements 13? And, did you purchase as a download from Adobe? If so, you can
    apply for a return/refund for 13. If you purchased elsewhere, then you would be governed by the return/refund policy of the seller.
    Adobe no longer sells version 12, so you would have to find a vendor who still has it in stock and purchase it. There is no way to "downgrade"
    13 to 12.
    What you may want to do is to download and install the Premiere Elements 12 tryout from the following web site to verify that 12 Motion
    Tracking works for you; whereas 13 cannot with regard to use of video for the Motion Tracking source media.
    Adobe Photoshop Elements 12 Direct Download Adobe Photoshop Elements 12 Direct Download Links, Premiere too | ProDesignTools
    Apparently this web site does not sell the tryout. It just makes it available for use.
    Before I posted my reply to you I looked at Motion Tracking with video source media on both Premiere Elements 12/12.1 and 13/13.1 on the same Windows 7 64 bit computer.
    If any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • The "new" hotmail no longer works with safari, but works with firefox. Hmm.

    The "new" hotmail no longer works with safari, but works with firefox. Hmm. i find this very convenient being a microsoft product. anybody else wonder why this new version happens to not be safari compatible? does anybody know if it works on the PC version of safari? if not, i find this to be a blatant move on microsofts part to bias the safari browser (especially since its basicly new on the window platform). forcing safari/hotmail users to "have" to use another browser to access their hotmail accounts.

    I have been successfully using Hotmail and Gmail with Safari for a long time. For roughly the past month, that relationship is rocky at best. At times, one of the following actions suddenly opens Hotmail, but it is a short-lived solution:
    (a) Hotmail directly
    (b) Hotmail Home>Hotmail
    (c) Sign up to Windows Hotmail
    (d) Deletion of prescribed cookies, resetting, etc. - made no difference
    Both Firefox and Opera work fine with Hotmail - especially Opera is very fast.
    In addition, Safari and Gmail does not work with Attachments, but otherwise Gmail is OK.
    I suspect I have to wait for a Safari fix because in my case I do not wish to abandon Hotmail, and Safari is a given. I would think that Safari would want to stay competitive with the two biggies, Hotmail and Gmail, which must have large numbers of users.
    I certainly would appreciate any other suggested fixes.

  • Macbook Pro speakers not working in OS but work in Bootcamp ?

    Had macbook pro for over a year so warranty is expired, i had spilled a drink on the laptop and thought that the speakers were lost for ever. But when i set up bootcamp with windows 8 the speakers now worked perfectly, this means that the speakers do still work and hopefully someone can give me some instructions on how to salvage them and get them working on OS !
    Sadly i've tried resetting the Nvram (Pram) and the SMC with no change to the speakers in OS, I would like to still have the speakers functioning in OS even though they work in bootcamp and if anyones got any tips or suggestions, please help !
    Frank

    There are many possible causes for this issue. Take each of the following steps that you haven't already tried. Back up all data before making any changes.
    1. Start with the steps recommended in this support article. Don't skip any of the steps. It's the starting point for further efforts to solve the problem.
    2. Run Software Update and make sure you have a fully up-to-date installation of OS X.
    3. If you've installed an application called "Memory Clean" or any other third-party software that is supposed to "clean" or "purge" memory automatically, remove it according to the developer's instructions and restart. You should do that even if the software is not causing the problem, because it's useless.
    4. Other third-party software that has been reported to interfere with sound output includes "Boom" and "Samsung Kies." If applicable, uninstall according to the developer's instructions (not by dragging something to the Trash.)
    5. If an AirPlay device is selected for sound output from iTunes (or from other applications via third-party software such as "Airfoil"), deselect it.
    6. Launch the application "Audio MIDI Setup" by entering the first few letters of its name in a Spotlight search and selecting it in the results (it should be at the top.) Select Built-in Output from the list on the left. If the Mute boxes are checked, uncheck them.
    7. If a red light is coming from the audio-out port, the internal switch is stuck in the position for digital output. You may be able to free it by inserting and removing a mini-stereo jack of the proper size. Inserting any kind of tool in the port may cause damage that won't be covered by your warranty.
    If there's no red light, the switch may still be stuck in the headphone position. Try to free it the same way.
    8. Disconnect all wired peripherals except keyboard and mouse, if applicable. If more than one display is connected, disconnect all extra ones. Restart and test.
    9. If you have a MacBook Air, turn off Bluetooth and restart.
    10. Start up in safe mode. Don't log in; just restart as usual when the login screen appears. When you do, make sure the words "Safe Boot" do not appear in the login screen. If they do, the system is still in safe mode and sound won't work.
    11. Reset the NVRAM.
    12. Reset the SMC.
    13. Triple-click anywhere in the line below on this page to select it:
    /Library/Preferences/Audio
    Right-click or control-click the highlighted line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Restart the computer and empty the Trash. Recreate your settings in theSound preference pane.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    14. Reinstall OS X after backing up all data.
    15. Make a "Genius" appointment at an Apple Store.

  • @Yahoo emails: not arriving to Mail (but work on IPad & iPhone)

    It doesn't seem to make much sense; but I have problems with my my @yahoo emails coming into Mail - but only on my MacBook Pro (OSX10.10.2), other devices do work.  So in brief:
    1) Email can send out via Mail (Password used for Outbound authentication) - but the same password entered, and emails don't arrive in to my account.
    2) Emails will both arrive and send from my iPhone and IPad (IoS) devices.
    Efforts to re-set:
    - I have logged out and then in multiple times on the webmail.
    - I have changed the password on Webmail access, and then copy and pasted across to Mail.  (outgoing mail still works, but inbound does not)
    - I have changed it via Mail / Accounts and also Mail / Preferences / Accounts
    This has happened before about 4 weeks ago, but then came to life after three days.
    I suspect a Yahoo server issue, albeit that i can't work out why emails can come to IOS, but not to OS X - but then again i'm no expert so there may be a reason?!

    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages

  • Wireless not working in linux, but works fine in windows vista

    Hello!
    I have installed Unbreakable Enterprise Linux 4 in a dual boot config. with Window Vista on a Compaq Presario laptop. After install completed I found that my on board Broadcom Wireless Adapter (Dell 1390 Mini PC card) was not recognized. I have tried installing NDISwrapper versions 1.48 and later 1.47 (after uninstalling 1.48) because everytime I got to the "modprobe ndiswrapper" received a fatal error about an unknown symbol or parameter, and on install I also encountered a "CONFIG_4KSTACKS" error as well. The good part is the light on my laptop for the wireless adapter finally came on and the driver (bcmwl5.inf) appears to be installed and the wireless adapter identified as being present, but it still doesn't show up in the network manager gui interface. So I am out of ideas if any one can give me a suggestion for a solution I would appreciate it.

    Hi there,,,,,
    I have Oracle Enterprise Linux 5 installed and Intel wifi 5100 card installed on my laptop. Wireless card does not work in Linux it works fine with Vista, I have dual boot. I have downloaded and installed the microcode for the wireless card for Linux,,,it is now active but it does not take ip address from dhcp and nor does it connect when i supply manual ip. it does not even scan for any wireless network. I have WEP enabled on my wireless network. It just says disconnected.....
    Please help me.....i have been trying to get this thing work for 3 weeks.
    thanks.

  • Page is not working in serverside but working correctly in JDEV

    Hi,
    After deploying the page which is working propely in my local machine JDEV,
    its not working same at server side. i bounced apache couple of time.
    if any one faced similar issue, please share.
    Thanks,
    Mahesh

    Pages are working fine in my loacl machine, but whn i compile pages (javacode) at server and running the pages from apps instance, pages are not working correctly. But whn I transfer the class file from local machine to server side page is working perfectly, what would be the reason.How to check the Java/JDK version
    D:\>cd jdevbin
    D:\jdevbin>cd bin
    D:\jdevbin\bin>java -version
    java version "1.3.1_01" -- Java Version on local machine
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
    Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
    On server
    [apeafin19@camoraapp10 ~]$ cd $ORACLE_HOME
    [apeafin19@camoraapp10 8.0.6]$ pwd
    /u01/oracle/eafin19ora/8.0.6
    [apeafin19@camoraapp10 8.0.6]$ cd bin
    [apeafin19@camoraapp10 bin]$ java -version
    java version "1.4.2_12" -- Java Version on server machine
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_12-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)
    [apeafin19@camoraapp10 bin]$
    You can see the difference of JDK installed on server and on our local machine which can be root cause of the issue
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Flash player not loading on http but works on https

    I have an issue where flash player shows "movie not loading" on http pages but works fine on https.
    I am using windows 7 64 bit, ie9 64 bit, i have tried it with the latest firefox and chrome and i still get the same issue.
    This started with flash player 10.3, the 10.2 version did not have this problem and all subsequent versions have the same issue. i am currently using the 11.2 version of flash.
    Example: Any flash video on youtube with the address beginning with HTTP, the video screen is black and when you right click you get movie not loading and the correct version of the flash player. If you change the header over to HTTPS the video works fine. this wouldnt be much of a problem except when going to any other website that has flash as its main element but does not have an HTTPS version, you cannot use the page or its features.
    I have uninstalled and reinstalled several times, done a clean install, deleted all files and updated every area of my computer but this issue remains. I have read the forums here and done any suggestions listed to no avail and noticed many people have this type of problem. This issue has now been going on for almost 6 months. Can anyone help?
    I may have posted this in the wrong forum and I appologize. If so can you please move it to the correct location?

    I don't claim to know the solution to your problem, but in your situation I would try either or both administrator install methods: 1) Right-click the downloaded install file, choose "Run as Administrator" and install the software as usual. 2) Try using a different Windows account that you are positively certain has full administrator rights or the actual Administrator login name, install with that account.
    Also, make sure you empty the browser cache before retrying the http pages. What about other browser settings, like security or privacy settings? Any add-ons or antivirus browser helper objects?
    Do you only use Internet Explorer, or is this issue the same in Firefox, Opera, Chrome and Safari?
    Good luck, hope you get the error fixed.

  • Videos will not work in Firefox but work fine in windows explorer. why?

    I tried to verify my plug-in's and all are enabled. I found where was suggested to remove and reinstall Firefox but that did not fix problem either. I tried to change viewer for videos but still no luck. Not certain why Quicktime doesn't work. Note, videos when browsing will not open but everything else works fine. Videos work fine with windows Explorer, but not Firefox.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Top Nav buttons not working after publish, but works in app. WHY?

    I have tried to find out why these buttons will not work after publishing. They work fine while in the iWeb app, but not when publishing. I do not have any objects near the top nav buttons. The first site went off without a hitch
    <www.serenitycustompools.net> the second site began the problem with the last page, the nav buttons would not work. Now this 3rd site, none of the nav buttons at top will work after publish, but will work in app. Anyone else having the same probs? None of my pages have the same names or any punctuation marks, and they are simple one word named pages.
    mini intel   Mac OS X (10.4.9)  

    They all work for me, try clearing your browser cache or using another browser.

  • @font-face not working in FF, but working elsewhere.

    Hey, I've been trying to get @font-face working in Firefox, but it just won't work. I'm hosting the font externally and the way I'm doing it works on other browsers. This is my code:
    <body bgcolor="CA2E28" style="margin-left: 0px; margin-right: 0px;">
    <style type="text/css" media="screen, print">
    @font-face {
    font-family: "Blackout";
    src: url(woff link is here, don't want to put it here though.);
    body { font-family: "Blackout" }
    </style>
    <center>THIS SHOULD BE BLACKOUT.</center>
    </body>

    ''jscher2000 [[#answer-709096|said]]''
    <blockquote>
    Can you check to see whether Firefox is downloading the file? To do that, first open the Web Console in the lower part of the tab below your page using either:
    * Ctrl+Shift+k
    * "3-bar" menu button > Developer > Web Console
    * (menu bar) Tools > Web Developer > Web Console
    Click the "Network" button/tab along the top of the console and reload the page. Here you can see whether Firefox is requesting the file and, if so, whether it is retrieved.
    If that checks out, then click the Console tab and reload the page and watch for any error messages that might relate to the font. Anything strange?
    If the font is downloading and there are no error messages, use the Inspector tab to look at the body element and see whether the style is there and is being given effect (i.e., no line-through).
    If all that is good, you might double-check your personal settings to make sure you aren't overriding website fonts. Either:
    * "3-bar" menu button (or Edit menu) > Preferences > Content
    Click the Advanced button and make sure you have a checkmark for "Allow pages to choose their own fonts".
    If all of that is good, then... it's a mystery. Have you checked Firefox on other machines or other operating systems?
    ''For reference:'' https://developer.mozilla.org/docs/Web/CSS/@font-face
    </blockquote>
    This message came upon refreshing:
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <my font like here>. This can be fixed by moving the resource to the same domain or enabling CORS. Blackout_Midnight-webfont.woff
    And this one soon after:
    downloadable font: download failed (font-family: "Blackout" style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed
    source: <my font link here>

  • Select query not working in Dev but working in QA and PRD

    Hi All,
    I have a select query with inner join which is not working in the DEV but working in QA and PRD. Anyone has any idea why is it happening, I think it to be a basis issue. Just want to confirm if anyone has any other idea.
    Thanks in advance,
    Barjinder Singh.

    Hi Barjinder Singh,
    In development you can't find the records for the table.
    In testing system only you can test even the program(report).
    If it is the DEV system you can't get the data.
    Go and see into the table wether it has records or not(in DEV system).
    It doesn't has the records in DEV system.
    Regards,
    Balakrishna.N

Maybe you are looking for

  • Word to PDF export - seeing dots within underlines

    When I export our Company financial statements from Word to PDF, dots are appearing on the PDF in all instances where there are double underlines within the document. The weird thing is these dots do not appear on a prinout of the PDF, nor when I mag

  • Error in DTW while importing purchase order

    Dear Experts, when trying to import purchase order ( Documents and Documents lines) ends up with an error key: DocEntry Reason: Vendor record not found application - defined or object defined error 65171 Please help Regards Jijo

  • Help! itunes crashes due to Codec Pack

    I installed this following codec pack: ACE MCP 603 Pro version 6.3.911.0. My itunes didnt start anymore (error message) (neither did Quicktime) after that, so i uninstalled the codec pack. Now itunes is still not working and i tried almost everything

  • XSTRING to PrintPreview

    Hello Guru's i got a little Question: I created multiple PDF-Forms with Adobe Interactive Forms. After that i merged them to 1 Single PDF with PDFTK. Right now i got the merged PDF type XSTRING as return value. Now i want this XSTRING to be displayed

  • Is there an option for downloading for connection that keeps timing out

    My home computer does not have a fast (enough) internet connection and will timeout when trying to download ANY application from the Adobe CC.  Is there a way to download the installation packages on a machine other than the one where they will be in