Question about APEX_PUBLIC_USER

I don't know how to set the authentication scheme"for our Apex application correctly.

Our applications Apex starts from a java application or a Web Forms application. For the java application or Webforms-request a correct connection has been made. Thus, a new connection to an Apex application name is unnecessary. That's why we chose the authentication scheme '(no authentication (with the help of DAD)) database'. The user can start an application Apex for example of Web forms, without an additional connection.
In the DAD we defined for the connection to the database from the user "APEX_PUBLIC_USER"! The Apex application works very well.

When an apex application is started, the application knows the user logged into the Web Forms. The user (webforms) will appear in the application of the apex, because we put the user as "wwv_flow.g_user: =: username".
Hollow of the user (=: username) control us access to the data manipulations or pages apex (= MEV). So, when you look at enforcement apex that you think, it is a public application, but it's not!

Our problem is that the application of the apex get no session number (-> "Session-Nr. = 0"). I think that this situation is the cause of our problems:
(1.) the user cannot save reports (interactive) (= > menue save is hide)
(2.) a user can copy the url of a pc to pc anothere (= browser)

I changed the application "public user" property of "APEX_PUBLIC_USER" to another value = > I always get the session nr "0". Only when I changed the user APEX_PUBLIC_USER in the DADS.conf to another user, the apex application works without these problems!

Is there a way to authenticate our apex application correctly?
Should I change the user (= APEX_PUBLIC_USER) in the DAD?
Why the "public user" applicaton property exist?

concerning
Robert

Hi Robert,.

APEX has not yet copied the URL of the item value in the element of your application using the Sentinel and invalid session procedures. The APEX_APPLICATION package has overall tables g_arg_names and g_arg_values that contain these values, however. You can use them to get the TOKEN value in the invalid session procedure. The globals are not documented and not officially supported, but we currently have no plans to remove them. You can also use owa_util.get_cgi_env ('QUERY_STRING') to analyze the parameters of f? p, if the use of variables not supported is about you.

Forms and Java should put the correct session id in the query, to join the existing sessions rather than create new ones. Here is how I could do this. You probably already have a sessions table that is shared between APEX and forms:

create table MY_SESSIONS (
    id number,
    apex_session number,
    java_session number,
    token number,
    token_valid_until date,
    created_at date not null,
    constraint MY_SESSIONS_PK primary key(id),
    constraint MY_SESSIONS_UQ_APEX_SESSION unique(apex_session),
    constraint MY_SESSIONS_UQ_TOKEN unique(token)
);

Startup forms, you put something like this in WHEN-NEW - EXAMPLE of the first form of FORM, create a new entry:

insert into MY_SESSIONS ( id, created_at )
values ( sys.dbms_crypto.randomnumber, sysdate )
returning id into :global.my_session_id;

When forms creates a link to the APEX, it uses a kind of code like this:

declare
    l_app number := 12345;
    l_page number := 42;
    l_token number := sys.dbms_crypto.randomnumber;
    l_url varchar2(4000) := 'https://host:port/apex/f?p=';
begin
    for i in ( select rowid, apex_session from MY_SESSIONS where id = :global.my_session_id for update nowait ) loop
        update MY_SESSIONS set
            token=l_token,
            token_valid_until=sysdate+1/24/3600
        where rowid = i.rowid;
        commit;
        web.show_document (
            'https://host:port/apex/f?p='||
            l_app||':'||
            l_page||':'||
            nvl(i.apex_session,0)||'::::TOKEN,P42_OTHERDATA:'||
            l_token||',4711' );
    end loop;
end;

On the 1st request, APEX will not get a session id again. The Sentinel fails and calls the procedure of invalid session. This verifies the token and success updates MY_SESSIONS with the new session id:

declare
    l_my_session MY_SESSIONS%rowtype;
begin
    -- read token
    for i in 1 .. apex_application.g_arg_names.count loop
        if apex_application.g_arg_names(i) = 'TOKEN' then
            select *
            into l_my_session
            from MY_SESSIONS
            where token = apex_application.g_arg_values(i)
            for update nowait;
            exit;
        end if;
    end loop;
    -- verify token and store session id for next requests
    if l_my_session.token_valid_until >= sysdate then
        update MY_SESSIONS set
            apex_session=apex_custom_auth.get_session_id,
            token = null,
            token_valid_until = null
        where id = l_my_session.id;
        commit;
    else
        raise no_data_found;
    end if;
exception when no_data_found then
    ... redirect to some error page or an APEX login page
end;

All subsequent applications that come in shapes will already have the correct session id and are not still must pass the TOKEN variable, as the Sentinel already accepts the session.

This is just a very rough sketch and probably has bugs, I did not test this. For example, you can add code that prevents the unrest in dup_val_on_index because of the existing of identifiers. I would also consider to implement this as a plug-in authentication instead of a custom authentication scheme.

Kind regards
Christian

Published by: Christian Neumueller on May 14, 2013 10:36
update fixed link block generation

Tags: Database

Similar Questions

  • Where can I ask a handful of general order questions about Firefox OS as a consumer and get the answers? (a forum or something similar)

    I have about seven questions about Firefox OS. I'm potentially interested in opting for a tablet that works instead of Android or iOS. I couldn't find a place to ask questions like that. Thank you!

    https://support.Mozilla.org/en-us/forums/Firefox-OS-English-Forum

    There is another option.

  • About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    About a month ago I posted a question about iMovie and not being able to "share". I solved the problem thanks, so no more emails!

    Hi Michael,

    If you want to stop receiving notifications by electronic mail, in the thread, that you have created, then I suggest that you follow the steps below:

    One time connected to the Apple Support communities, visit your mini profile and select manage subscriptions.

    Content

    To manage this content, you are currently subscribed and changing your preferences, select the content.

    Select next to see what content you are currently following.  Note that any thread you are responding you subscribe you automatically to this thread.

    You can select to terminate a subscription to a thread.

    Learn how to manage your subscriptions

    Take care.

  • Where and how do I ask questions about Email?

    The Commission opening thingy is complicated, I have trouble finding my way around it.  I don't know where or how questions about email.  Is there an easier way than trawling through all these icons?  Like a list or something - as you get on all other forums on the internet?

    It would be a good starting point: Mac mini

    Or the appropriate under MAC Os and system software section.

    You might also find this useful: find answers and new questions

  • Many questions about the HP 50 g

    I just ordered a HP 50 g graphic calculator! I have a few questions about this so hang on tight! What is the USB connector on the calculator? Mini-USB, micro USB, or is it a connector owner, "custom". Then, it would be possible to connect a keyboard to the HP 50 g by using the USB Port? Is there a program that would make this possible? (I doubt it would work if you plug it..) I have a Mini-USB to female USB 2.0 connector. So I could just plug the keyboard right, provided that the port on the calculator is a Mini-USB Port. If this is not so that I could use my female to female USB adaptor to connect the keyboard.

    Thanks for your help,

    Zekelegge

    Hi!, zekelegge:

    Welcome to Forum!

    The only printer I use, 50G calculators, 48GII, 39GS and 17BII +, as well as many former models, such as the 48 s/SX/G/G + / GX, 38 G, 39 G, 42, 41 C/CV/CX and 28 C/S, is the infrared printer HP 82240 b. If you can use the emulator HP50G, on the PC, the simulator of the printer, you can download, since... http://www.HPCalc.org/details.php?id=7386

    The printer... HP 82240 B

    The cable series...

    The description... http://www.allenwan.com/hpcalcserialcable/

    The original cable...

  • Question about warranty after exchanges of RAM on Satellite module series

    Hello together,

    I have a question about the warranty. My laptop is 5 months old and now I want to improve it with more RAM. I want to do it myself, and now I'm wondering if the warranty will be getting hurt.
    Thanks in advance for your answers.

    Concerning

    TiG3r

    For new models of laptops the RAM upgrade described in s operating manuals. It is public act and it shows the owner of the notebook how do RAM upgrade only.

    If Toshiba offers something like this he won't have the negative influence of valid warranty.
    Buy a compatible module and RAM upgrade.

    Bye and good luck!

  • A few quick questions about the Satellite P300 - 18 M

    Hello

    I am about to order a Satellite P300 - 18 M and have just a few questions about this:

    (Although these may apply for other similar Satellite/Equium P300.)

    Is the touchpad made by / to use the Alps or Synaptics driver?

    It has the Wireless N network card, is the map made by Intel or Realtec?

    And also, someone has experience with face recognition software to connect?

    If so, does it take a lot of time to initalise?

    Thanks in advance,
    Jack

    Hello

    The P300 - 18M belongs to the PSPCCE series.
    It uses the two touchpad drivers. Synaptics & Alps Electric
    There is an Intel 802.11agn minicards WLan installed

    The face recognition is a nice tool but local to be illuminated and you must take your face the right of the post sometimes it of not very easy

    But if you face is recognized correctly that the connection should work properly

    See you soon

  • Questions about nb200

    I recently bought a mini nb200 with windows 7 and I have a few questions about it. How can you set up your email, I was willing to put up with Outlook Express, but I don't know if I can. Also, is there a way to get a paper copy of the user manual?

    You can download and install a new e-mail program when you download Windows Live via Microsoft Update. You can select the components of Windows Live, you want to include by checking a box for each you want. I installed all the. Or you can use Outlook, if you have Microsoft Office and you want to install it.

  • A few questions about the difference between the Satellite P70, L70, S70

    Hello, I have a lot of questions about the P70, L70, S70 series that come with a 1920 x 1080 panel.

    (1) what are the differences between the L70 and S70 series? With the exception of the RAM and HARD drive capacity, books seem pretty identical.

    (2) P70, L70, S70 doesn't support a 2nd HARD drive or it's just the P70 series that support?

    (3) all the three (P70, L70, S70 series) come with the same TFT panels?

    (4) of the above series, which supports mSata?

    (5) all the model of each series are delivered with support from mSata? For example, it could be that L70 - a - 13 m supports mSata is not the case of the L70-a-146?

    (6) all the foregoing, are delivered with a S - ATA II or III S - ATA interface?

    (7) who is the best of these series listed? I'm trying to understand what makes the big difference of S70 to P70 except for the envelope for example.

    Thank you in advance.

    > (1) what are the differences between the series L70 and S70? With the exception of the RAM and HARD drive capacity, books seem pretty identical.

    What models Sat L70 and S70 do you mean exactly? There are different L70-xxx-xxx and S70 models on the market that supports different hardware specifications.

    (> S70 2) P70, L70, support a 2nd drive HARD or is - it just the series P70 that support?
    As you can see in this [Sam P70 HDD replacement document, | http://aps2.toshiba-tro.de/kb0/CRU3903II0000R01.htm] the P70 series supports the 2nd drive Bay HARD, BUT even if there is a 2nd HARD drive Bay, this does not mean that you can use the 2nd HARD drive. In the case where the 2nd HARD drive Bay are equipped with HARD drive connector, you can use the 2nd HARD drive

    I also found the [Sam L70/S70 HDD replacement | http://aps2.toshiba-tro.de/kb0/CRU3703HG0000R01.htm] the document on the Toshiba page and there I see this 2nd HARD drive Bay is not available

    (> 3) all three (P70, L70, S70 series) come with the same TFT panels?
    See point 1). Different P70, L70, S70 models were equipped with different material parts.

    (> 4) of the series above, which takes in charge mSata?
    As far as I know that some P70 models are equipped with an mSATA SSD of 256 GB.

    (> 5) do all the model of each series are delivered with support mSata? For example, it could be that L70 - a - 13 m supports mSata is not the case of the L70-a-146?
    See point 4) not all models supports the same hardware specifications

    (> 6) all of the above, come with a S - ATA II or III S - ATA interface?
    I don t think that SATA III is supported. I guess it would be SATA II

    (> 7) which is the best of these series listed? I'm trying to understand what makes the big difference of S70 to P70 except for the envelope for example.
    Not easy to answer because there are too many models released in Europea.
    And not all models are available in each country. So I guess you will have to look for the models that have been released in your country.

  • Satellite L650-11R - a few questions about this

    Hello there :-)

    I have a few questions about my new L650.

    I've never had Toshiba notebook before so I apologize if some of these "quirks" are actually quite normal on this laptop. I really want to hear the views of other users L650.

    1)
    First of all, by the time I turned it on I saw gradient thin (1-2 mm) along the right edge of the screen that goes from the bottom up. Maybe "degraded" isn't the right word, but it seems that since two or three pixels are kind of discoloration or lose brightness/sharpness to the edge along the straight bezel. It is not really that visible, looks like the colors are desaturated a bit here or brightness is a bit lacking. He can be seen everywhere (bios or no color in Windows, but better in the lighter background).
    The left side (or other) seems ok, all this along the right edge is somewhat suspicious. If one can compare? I don't know if it's something to worry about or is just supposed to be like that.

    2)
    The other thing I noticed heating of the processor (Intel i3 330M) and GPU (ATi Mobility Radeon 5650). It's pretty hot here right now (I would say that the temperature is around 28 degrees Celsius when using cell phones). He is sitting on the hard surface (table) and nothing is blocking the vents.
    However, at "rest" (surf the web & regular light stuff), average CPU temp hovers around 58 ° C. It usually goes from 45 to 62 in just a few minutes after starting, and then I can hear and see (Toshiba PC Health Monitor) evacuate the kicks in. Temp goes back to 50 +, event stops and then the temp rises to 60 + until the vent is used again.
    During load full (Prime95 or some games), CPU is going all the way up to 75 degrees (the highest being 77). Fan runs at 75 to 77% during this time, never go faster.

    GPU idling is usually around 5 degrees above temp CPU (62-65). During full load (for example. Benchmark of Far Cry 2), I see a lot of stuttering with the latest drivers Catalyst and DX10 (not sure if the stuttering has something to do with heat), otherwise it is ok (no artifacts or anything like that). Temp of GPU during the loading goes up to 74-75, fan speed is locked at 30%, the frequency of the heart 5650 is 450 MHz. left side of the laptop (vent and below) is pretty hot, while the keyboard is warm (or slightly warmer who who).

    These time seems correct and safe in the long term? I'd rather events works all the time (they aren't really very strong) and keeping time less than 50, but there are just wishful pious bios control events and I can't control not the bios. :-)

    3)
    This is just General related products. :-)
    Official specifications of Toshiba L650 say ATi 5650 (between other low range GPU), but I saw a few specifications calling for there 5730 (same model 11R). Is there really a Satellite L650 with ATi 5730 GPU models?

    Sorry for the long post, I tried to include the best possible description that I could do. :-)

    Thank you in advance.

    Thanks for the additional info!

  • Hi there, I have a question about storage, even if I have 2, 53GB, storage watch 21, 99GB usage, why this difference? I use an iMac 2009, thank you!

    Hi there, I have a question about storage, even if I have 2, 53GB, storage watch 21, 99GB usage, why this difference? I use an iMac 2009, thank you!

    Spotlight re-indexing.

  • A few questions about the upgrade on Satellite A300-144

    Sorry for the typos, English is not my mother tongue.
    I want to ask some questions about the upgrade of a300-144.

    * Some info first.*

    CPU: T2370 ([http://ark.intel.com/products/34445/Intel-Pentium-Processor-T2370-1M-Cache-1_73-GHz-533-MHz-FSB]).
    Chipset: GM965 ([http://ark.intel.com/products/29821/Intel-82GM965-Graphics-and-Memory-Controller]).

    * Questions.*

    1. my frequency of laptop memory at 533 MHz, supports 667 MHz memory controller, memory modules can work at 667 MHz. Is - this because CPU FSB 533 MHz frequency and new processor at 667/800 MHz FSB will fix it or it is hardcoded in the BIOS?

    2 Intel said that the size of max memory for my chipset is 4 GB (2 x 2 GB), but Toshiba says that only 2 GB (2 x 1 GB), who is right?

    3 I know, taken of my CPU is μFCPGA-478 aka socket P, max FSB 800 MHz, max 35 W TDP, so T9500 ([http://ark.intel.com/products/33918/Intel-Core2-Duo-Processor-T9500-6M-Cache-2_60-GHz-800-MHz-FSB]) is a compatible processor or there are some limitations in the BIOS?

    > 1. My frequency of laptop memory at 533 MHz, supports 667 MHz memory controller, memory modules can work at 667 MHz. Is - this because CPU FSB 533 MHz frequency and new processor at 667/800 MHz FSB will fix it or it is hardcoded in the BIOS?

    The speed of the memory is related on the material. This means that the FSB is responsible for the limitation.
    If the FSB would allow support 667 MHz then the memory would also at this speed.

    > 2. Intel says that the size of max memory for my chipset is 4 GB (2 x 2 GB), but Toshiba says that only 2 GB (2 x 1 GB), who is right?
    The memory depends on the chipset. So if the chipset supports 4 GB of RAM, you should be capable of this move to 4 GB of RAM

    > 3. I know, my CPU is? FC-PGA-478 aka socket P, max FSB 800 MHz, max 35 W TDP, so T9500 (http://ark.intel.com/products/33918/Intel-Core2-Duo-Processor-T9500-6M-Cache-2_60-GHz-800-MHz-FSB) will be a compatible processor or there are some limitations in the BIOS?

    It might be possible that the new processor would be fully supported by the BIOS, but in most cases it should not be a problem if the chipset would support the new processor.
    But as far as I know the upgrade of the CPU is not supported by Toshiba or any other manufacturers of portable and its your own risk to run laptop with the new processor.

  • Satellite A350D - 20K - Question about upgrade second HDD + Temperature

    I have a question about my laptop. I have notticed it is a second location of HARD disk on the bottom.
    Is it possible to use this to increase my storage?
    And if yes, how do I do that? I don't see all the connectors.
    What type of HARD drive to use in case it is possible to use this slot machine?

    My second question is on my laptop to be very hot after a short period of use.
    I installed speedfan to record the temperature. When I start the laptop, it already is between 45 and 50 degrees.
    He stayed there for half an hour and then it starts to get warmer. When I start to use the laptop for anything, it triggers to between 70 and 80 degrees.

    This does not seem normal to me. I tried to clean the vents with compressed air, but it has not made a difference.
    I searched on the internet how to take the laptop part for proparly cleaned TI.
    But I can't so I'm looking that destroy it.

    This could be the cause and more importantly, how can I solve this problem?

    Tom

    The second HARD drive bay contains the HARD drive connectors?
    If Yes, then you can use a SATA 2.5 HARD.
    If there are no connectors, then you will not be able to use the second HARD drive

    > I have installed speedfan to record the temperature. When I start the laptop, it already is between 45 and 50 degrees. He stayed there for half an hour and then it starts to get warmer. When I start to use the laptop for anything, it triggers to between 70 and 80 degrees.

    CPU and GPU produce a lot of heat. The heat dissipation is always created then there s nothing unusual that the temperature rose to higher level.
    You can change the settings in Win 7 power management. You can set the CPU to lower performance and can increase the activity of fan, which will help lower the temperature.

  • Question about temperature internal Satellite A300 ND1

    Hello

    I have a question about the temperature of the standards it of ok for my laptop and what is the normal temperature and how can I keep it low?

    Thank you.

    Hello

    It's not easy to say what a normal temperature could be.
    The temperature is not always the same and it depends on the use of the laptop.
    Usually, the temperature would increase while gaming or running applications high performance. Why? Because all devices such as the CPU and GPU would focus the heat dissipation and this leads to a higher temperature.

    > How can I keep it low
    Very simply, you can keep still low level, but you can make sure there is enough free space around the laptop to ensure good air circulation.
    Also don t use the laptop on your knees etc in order do not obstruct cooling fans.

    It s also advised to clean the fans from time to time using the jet of compressed air. These sprays are really useful and could buy in the stores of different computers.

  • question about laptop connectivity

    Question about my laptop computer connection

    Hello

Maybe you are looking for

  • DeskJet f4580: printer not not using printing ink wiile

    Hi I set up a new printer installed evrything, then I went to print a paper of jpng or png file. The normal fine. but the paper is empty no ink on this subject. has obtained new cartridges. It displays complete on both displays no error code.

  • Satellite C50-B-131 does not recognize external hard drive

    I used an external hard drive to back up my data. Suddenly my laptop (C50-B-131) says it does not recognize the device. Any help is welcome. I tried to uninstall and reinstall the driver for the drive.Thank you

  • Satellite L - no power from the power cycle hard!

    Hi guys,. I hope you can help me, I have problems with my keyboard on my laptop, when I typed nothing was happening. So I read on the internet by Toshiba for 'hard reset' laptop. I followed this procedure;(1) remove the battery(2) button for 30 secon

  • Bike E 2nd Gen supports Bluetooth Aptx codec?

    Hi all Does anyone know if the E bike (2nd generation) supports the Bluetooth Aptx codec? The official website of Aptx is not reliable for this info, because there are devices that I know support Aptx, but are not listed on this Web site. Does anyone

  • Error code 7c45158d-c250-443c-826f-4b63883a9272

    page host comuter is black with a garbage can and a mouse icon.  Error code 7c45158d-c250-443c-826f-4b63883a9272 says I have no disk space and it was 3/4 empty. nothing works