How to check for the application ID in a function of connection?

Hello

I have a connection procedure which is something like this:
wwv_flow_custom_auth_std.login(
    P_UNAME       => :P58_USERNAME,
    P_PASSWORD    => :P58_PASSWORD,
    P_SESSION_ID  => v('APP_SESSION'),
    P_FLOW_PAGE   => :APP_ID||':15'
    );
And the authentication procedure is this:
create or replace
FUNCTION  "ACL_CUSTOM_AUTH" (
    p_username IN VARCHAR2,
    p_password IN VARCHAR2
    )
RETURN BOOLEAN IS
BEGIN
  FOR c1 IN (SELECT 1 
              FROM acl_employees
             WHERE upper(userid) = upper(p_username)
               AND mot_de_passe = p_password)
  LOOP
    RETURN TRUE;
  END LOOP;
  RETURN FALSE;
END;
I want to check for an application in the acl_employees table ID, because I want to check if this user is credited for THIS specific APP_ID, adding a following kind of code to the function of authentication:
AND application_id = :app_id)
The problem is that the connection API takes in charge only two parameters for custom authentication: user name and password. How can I switch the APP_ID to authentication?

Thank you for your help.

Christian

Published by: France Christian February 23, 2010 06:23

Published by: France Christian February 23, 2010 06:24

It is sometimes easier to check the user before calling the connection custom Apex then past just a password to NULL to the connection works if the check fails. Something like that before the connection:

DECLARE
v_dummy NUMBER;
BEGIN
SELECT 1
INTO v_dummy
FROM acl_employees
WHERE upper(userid) = upper(p_username)
AND application_id = :app_id;
EXCEPTION WHEN NO_DATA_FOUND THEN :P58_PASSWORD := NULL;
END;

Tags: Database

Similar Questions

  • How to check for the two first digits?

    Can someone please... There is demand to have a hidden field on the form that will be filled with data. It's going to be 6 digits long and could start with 02 or 04. I need to check on the DocReady event, for the first two digits. If the first two digits are 02, the presentation of the form will remain as it is. If the first two numbers are 04, I'll have to show two hidden subforms. Can someone please provide an explanation on how to check for the first two digits of field 6 digits and do some actions.

    Thank you very much

    No, only in the event: Exchange.

  • How to check for the date validation

    Hello

    I have 3 validation of date in order.

    10 - P1_FROM - (type - Item specified is a valid date)
    20 - P1_TO - (type - Item specified is a valid date)

    30 compare dates P1_FROM & P1_TO
    I want to run it only when these 2 dates are field not null not and registered as valid a date.
    HOW to set that State...
    Type - Function returning bollean
    
    Validation Expression1 - 
    if TO_DATE(:P1_TO,'MM/DD/YYYY') <= TO_DATE(:P1FROM,'MM/DD/YYYY') then
         return false;
    else
         return true;
    end if;
    
    Condition- PL\SQL Expression // I want to put a condition here NOT NULL as well as VALID date
    :P1_FROM is not null AND
    :P1_TO is not null
    Thank you
    Deepak

    Try an exception handler. for example

    begin
    if :P1_TO is not null and :P1FROM is not null then
      if TO_DATE(:P1_TO,'MM/DD/YYYY') <= TO_DATE(:P1FROM,'MM/DD/YYYY') then
        RETURN 'From date cannot be after the To date';
      end if;
    else
      if :P1_TO is null and :P1FROM is  null then
        null;
      else
        RETURN 'Both To and From values must be specified';
      end if;
    end if;
    EXCEPTION WHEN OTHERS THEN
      RETURN 'Invalid Date';
    end;
    
  • How to check for the ConnectionState of ESX hosts

    Hello

    I would like to be able to check the status of connection to a host list before executing a block of code against the list of hosts. If the host is in a disconnected state, I want also to write in a name csv file and connection status of any host that is disconnected before you run the code block against the rest of the hosts in the list.

    That's what I've tried so far:

    $ESX = "C:\Temp\host.txt".

    foreach ($vhost to $ESX)

    Get-VMHost $ESX | Select Name, ConnectionState
    If ($vhost. ConnectionState - eq 'offline') {}

    {
    $vhost | Export-CSV "C:\Temp\report.csv" - NoTypeInformation
    }
    }

    Thank you

    Try like this

    $ESX = "C:\Temp\host.txt".

    Get-VMHost-name $ESX |

    Where {$_.} ConnectionState - eq 'offline'} |

    Select Name, ConnectionState |

    Export-CSV "C:\Temp\report.csv" - NoTypeInformation

  • How to check for the plan of the historic explain SQL 10 g command

    Hello

    It is a way to check the history of sql explain plan?

    Is this possible via sql? I can check it using OEM but... I would like to know if this can be done through sql.

    Thank you
    Jams

    Findout the sqlid to awr.

    SELECT * from TABLE (dbms_xplan.display_awr ('br7hhp7m0qauk'))

    HTH

    Mathieu

  • How to check what Qt application is run for the first time?

    How to check what Qt application is run for the first time? I need for the creation of trial version of my application. Any help is greatly appreciated

    Probably use file data and put an I_ran_at_least_one_time file and verify its existence. This file is not accessible to the user and is not changed even if you upgrade the application.

  • How to check that my application is in the context of the background thread

    I'm listening to push into the background thread, but I want to receive the push only when the application is in the background, and then how to check that the app is in the background

    check if it is listed in http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html...

  • How to change the boot order for the applications to the taskbar?

    When I moved to W7, software of my trackball wouldn't work and Kensington wouldn't fix, so I moved to a conventional mouse. I recently bought a better mouse and it has its own software. The software works very well, the problem is that it starts towards the end of the boot sequence. I would like to start earlier. The problem is that all the research I've done changing the order of departure come back with how to change the order of display in the taskbar.

    How can I change the boot order for the applications to the taskbar for the software for the mouse, boots earlier in the list?

    Windows does not have native to adjust the boot order, but there are third party solutions. See

    http://www.howtogeek.com/52043/how-to-control-the-order-of-startup-programs-in-Windows/

  • How to check if the database for DRDA gateway is installed and configured.

    Hi all

    How can we check if the database for DRDA gateway is installed and configured.

    Our operating system is AIX 5 L 64 bit OS.
    RDBMS: 11.2.0.3

    Kind regards

    Duplicated
    How to check if the database for DRDA gateway is installed and configured.

    + - locked thread-+.

    Nicolas.

  • I was charged twice for the application of export it in PDF format. How can I cancel?

    I was charged twice for the application of export it in PDF format. I want to cancel both. How can I do this? I failed to export the PDF to Word, and I am not satisfied with this product.

    Hi Kate, Canada

    I'm sorry that ExportPDF has not worked for you. Please see to cancel your subscription or membership. Acrobat.com online services.

    Best,

    Sara

  • What ever the data that we are loading in HFM, how to check if the data are correct or not?

    Hello!

    This is SANDEEP, I loaded data using FDM in HFM. How to check if the data is correct or not, what ever the data I was responsible in HFM.

    Please tell me how to recover the data and what format, clearly can you me the data verification process step by step.

    It would be useful for me...

    Thanks in advance...

    Kind regards

    SANDEEP

    Hi Sandeep,

    I think the best way is to extract data from HFM for the same POV that you have loaded FDM and check if it is the same.

    If you then use HFM 11.1.2.x version

    1. login to the application and go to the menu Administration / extract / data.

    2. set the POV that you have loaded the data, then unzip it. You can open the file unzipped in a notebook

    3. you can compare the file with the data file generated by FDMEE under Outbox folder.

    But what would you give all the data corresponding to the POV that you set. So please ensure that you have the correct POV, defined according to the export FDMEE.

    Thank you

    Chandra

  • Check for the existing index

    I'm a DBA working with 3 application developers, they want to know how to check for existing indexes for some columns
    in a table in their schema.

    a friend told me to check the existing index for some column you have to query
    view dba_ind_columns so you must be a sysdba user

    but I don't want to give the developers of the application of the privilege sysdba

    but my friend told me, to avoid sysdba grant for application developers, they can query the user_indexes view in their scheme, but after watching the user_indexes view,.

    It gives me a lot of data but does not give me the NAME of COLUMN

    How can I solve this problem, which is:

    Let application developers check existing indexes for some columns in their schema without granting them sysdba privilege.

    user_ind_columns

  • This computer is no longer allowed for the applications installed on your iPhone

    I tried to sync my iPhone 6 more with iTunes in my MacBook Pro.  During this process, a window popped up that says, "this computer is no longer allowed for the applications that are installed on the iPhone" iPhone 6 more "." You want to allow this computer to items purchased from the iTunes Store? »

    I clicked on allow and another window popped up that says, "Enter Apple ID and password.  If you have an Apple ID and password. Enter them here. "(If you use the iTunes Store or iCloud, for example, you have an Apple ID.)  "You can authorize up to 5 computers for each Apple ID."

    Apple has recently replaced the logic board on my MacBookPro (early 2011).

    There are 3 iCloud Apple ID.  First of all, I allowed my MacBook Pro.  Then he asks the password of the Apple ID for my iPhone 4.  While I was still with my iPhone 4, there was a problem and Apple technology had me install a new Apple ID.    Then I was asked for passwords for the Apple ID for iPhone iPad Air and 6 more.  Then another pop-up window says, "the authorization of the computer succeeded."  "You have allowed 5 computers on your 5 available."

    This could be 5 'computers' if Apple still has the original map of the logic.  It is always 1 MacBook Pro, which has a new logic board and if I called the Apple Support, I guess the UUID hardware is Apple going to buy and I did that for this new logic board, but not for the old.  I would have thought when the old logic board has been subscribed by technology, he or she would have known in order to erase the original UUID for my MacBook Pro in the main Apple system and replaced it with the new.  BTW, the old logic board works great.  It was the video card that was bad and my computer has a problem to wake from sleep or boot.  Everything worked very well when I took it for repair, so technology might have gotten the UUID of the old logic board.  Since I'm not a computer tech, I'm probably missing something.  I don't understand why I had to do it all.

    So, how can I get this problem fixed then the old logic board is not counted?

    Thanks in advance!

    Note: where it is said to 'Select a category', 'importing & Burning in iTunes', was the closest I could come to picking a category.  If I posted this in the wrong place, please move to the community right and made me know.  Thank you!

    You need not do anything.

    If, in the future, you need a permit for a new computer, then just reauthorize all, then allow all of your active computers.

  • How can I remove the application dropbox to my Imac?

    iMAC 21.5 Inc.

    OXS X El capitan

    10.11.3 Versie

    How can I remove the application dropbox to my Imac?

    I get a warning when I click on the dropbox app to delete!

    Thank you very much

    ollylibby

    Official instructions are here-> https://www.dropbox.com/help/41

    It helps tremendously if you actually post the text of the error message that you receive.

    You may need to view the activity monitor, search for dropbox and stop all processes before removing the Dropbox app in the folder/Applications.

  • Lack of Options &gt; Advanced Options &gt; Applications entry for the application of Simulator test

    I'm new to BlackBerry dev and I'm still doing my set up and tested development env.

    EPS consists of XP, Eclipse SDK 3.4.1 BlackBerry JDE plugin for Eclipse 1.0.0.67, BlackBerry component Pack 4.3.0.16 version 4.3.0 and the BlackBerry 8120 Simulator.

    I created a test application simple and loaded on the Simulator for testing through the cmd Eclipse Run > run as > Blackberry Simulator.  As expected, the application icon was displayed on the screen of the Applications (in the Simulator), and, when selected, the application has successfully launched and behaved normally.  So far so good.

    However, when I checked the Options > Advanced Options > Applications on the Simulator, I found that my request was not among others installed apps.  (I tried on two other simulators with the same results.)  I thought about reading the other posts on this forum that I would wait to see this information.   When I install on a simulator I would indeed expect display name information and the app version contained in Options > Advanced Options > Applications list?  If Yes, what should I do to make the information appear?

    Thank you.

    If you install your app in the Simulator simply by copying the COD file in directory of the Simulator (what is JDE when you run Debug), then you should not wait for the application to create. The modules in the files of the cod will be stil it well and that's all that generally the County. You can see the list of modules under Options-> Advanced Options-> Applications-> (Menu)-> Modules. Applications that are included in the Options-> advanced-> Applications are just constructions of metadata on top of modules to simplify various tasks, like setting permissions, adding and removing applications rather than tracking dependencies and individual modules.

    PS, You can programmatically create the entries in the application using the CodeModuleGroupManager and CodeModuleGroup if you really must have your request under Applications. Do not however forget that classic pose methods (Desktop Manager, Web OTA Download, BES OTA Push) all create them the entries in the appropriate application. So, you don't usually have to worry about this problem in the production environment.

Maybe you are looking for