Custom authentication not found

Hello

My application is called APPEVT2TAB.
I created a packaged function to test custom authentication:

create or replace package pkg_appevt2tab as
function f_authenticate (p_username in varchar2, p_password in varchar2) return Boolean;
end pkg_appevt2tab;
/
create or replace package body pkg_appevt2tab as
function f_authenticate (p_username in varchar2, p_password in varchar2) return Boolean is
Start
insert into test_table values ('start');
commit;
Returns true;
exception
while others then
Insert values into table_test ('exception');
commit;
Returns true;
end pkg_appevt2tab;
/
create public synonym pkg_appevt2tab for pkg_appevt2tab;
Grant execute on pkg_appevt2tab to public;

In the authentication box, I "return pkg_appevt2tab.f_authenticate;" (without the quotes, of course) and I made sure that the custom authentication process is underway.

When I run my application, I can't connect (I get "Invalid Login Credentials").
When you check the test_table, it has no records inside.

I tried to change the value of the field authentication for "return pkg_appevt2tab.f_authenticat;" (the last 'e' is missing, which is a name not valid) and found that the behavior is exactly the same.

So far, my conclusion is therefore that the packaged function cannot be found.
Is this correct? If so, why?, if not, what is the problem?

Any help would be appreciated!

Thank you

Gabor

Gabor:

This comment

I tried to change the value of the field authentication for "return pkg_appevt2tab.f_authenticat;" (the last 'e' is missing, which is a name not valid) and found that the behavior is exactly the same.

leads me to suspect that your application uses a different authentication scheme somehow. Where authentication is misspelled or is unavailable, APEX triggers an appropriate error when attempting authentication.

CITY

Tags: Database

Similar Questions

  • resources for customizing Windows not found on the server

    Hola

    Tengo vsphere don't con vcenter, y estoy venga perform the tests y no can not desplegar una nueva Máquina virtual basandome in una plantilla, en el Assistant me da dice:

    resources cutomization Windows not found on the server

    Y todo aprarece appears.

    He descargado el sysprep y he probado en leave in several rutas distintas, probando a ver en cual works,... of momento in none pero me ha funcionado:

    C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\1.1

    C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep

    C:\Archivos programa\VMware\Infrastructure\VirtualCenter Server\sysprep

    C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep

    C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\1.1

    ¡¡Aucune hay manera wearing

    Saludos

    Hola

    Cuando you refieres a:

    The creo Ahí las carpetitas that enriched para los sistemas operating different.

    No you aparecian are con make? Como you comenta jose_maria no don't be crear carpetas sino use deben las existing. Perhaps the problem of the creation of cada vidéoconférence venga y permissions that the asignan... can VCenter no can access has provided carpetas.

    Puedes revisar permissions? o heredar desde sysprep?

    Saludos

    If upon esta u otras answer useful, por favor considered el puntos seleccionando respuesta correcta o util como asignar

    If you find this or any other answer useful please consider giving points by checking the answer useful or appropriate.

  • Payment through custom authentication not based on a scheme simple name of user and password

    We are looking at Adobe DPS to publish our digital magazines.  Like many other publishing companies, we also have existing customers 'print '.

    We have an authentication solution that uses WS-federation.  It works by accessing our connection site.  After the user is authenticated, we POST a security token JWT to return to the calling application.  It is important to know that we want to show the user interface for the connection.  Some of our connection to customers through their Facebook/Twitter account, so we have no password for them.  Our site of connection also allows all our applications and Web sites evolve in a coherent way.  For us, it's really important that we don't create additional identifying information for our users.  We want that they authenticate in the same way everywhere.  (connection website also deals with changing the "General conditions" and will be automatically enabled future external identity providers (such as Google and Microsoft - it also allows to force people to update their profile, if we do not have a complete profile etc...).)

    The right DPS solution, we see that the only option that is provided out of the box is to authenticate users by name of user and password credentials.  Is it possible to replace this mechanism with a scenario "open embedded browser / capture token"?  If so, how is that possible?  (I guess that other operations of payment are OK for us)

    Thanks in advance.

    In the new DPS (2015), the only way that a user can connect is via the dialog box native SignIn using the credentials of the user/password. Details: The native connection method will result in a call to the serviceAuthURL specified parameters of the Integrator for Direct payment. DPS will make an Http POST request to the URL SignInWithCredentials passing the username and password. DPS expects an authentication token to be returned to the viewer stores in native mode. This authentication token is what identifies the user for direct payment calls

    In the earlier version of DPS (classic), connection differs in two ways:

    1. DPS allows HTML to open a speed of connection of the freeform and similarly out of the application to get an authentication token
    2. DPS had a SDK API library whose application could explicitly define an authentication token after the opening of the flow of custom connection

    There is no equivalent for classical DPS SDK API in 2015 of DPS at this time. Although we plan in the future for additional capacity of connecting OAuth/Social.

  • securityContext.authenticated not found in the workspace

    Hi all

    We are migrating application Forms Oracle JDeveloper 11 g.

    We follow a modular approach to building application. Overall, demand has a number of workspaces application.

    A workspace user interface is developed in order to provide common characteristics of appearance, including page templates, skins, etc.

    Currently we working on the workspace of the interface user and development model. We want to show different messages based on the connection. If the user is logged a message like 'You are logged in as ABC' and then 'not connected' not displayed.

    We use the af:switch component, where name of facet is returned by a ternary expression * #{securityContext.authenticated?'} {LoggedIn': 'loggedout'} *. The expression builder is not recognize securityContext.

    I need to enable security in any workspace before using securityContext or some special needs?

    All suspicion or guidance will be highly appreciated.

    Best regards
    Bilal

    Hello

    not sure which release of JDeveloper, you're on. I tried 11.1.1.5 and here the EL shows for all projects that are configured to use the ADF Faces. The entry "securityContext" is under the 'ADF Bindings' node in EL Editor

    Frank

  • Custom authentication tokens

    "Adobe Flash Access Overview on protected streaming" white paper States the following:

    Flash Access supports the business logic of the licensing stage decoupling based on the chips in use with Flash Media Server deployments. For example, when users visit a web portal for rental or to subscribe to the content, they may need to authenticate by providing a user ID and password to confirm their registration. They might also need a financial transaction. The web portal enters the results of these operations in an authentication token that is sent to the client application. The customer can then include the token in the licence application. The license server checks the authenticity of the token before issuance of the licence. Check token is stateless and was completed independently by each server without reference to a database or another shared state. Token is based on a secret or public key shared infrastructure (PKI).

    This raises the following questions:

    • How the web portal must generate the token?  This is a serialized AuthenicationToken or some other binary token?
    • If it's an AuthenicationToken, then how the web portal must generate a token such as this feature is part of the license server?
    • How the chips are based on a shared secret or PKI? What is incorporated into the class AuthenticationToken ?

    As I read, the paragraph refers to the regime "of custom authentication", not the authentication scheme name of user/password supported and as such, it is not to use serialized Flash Access AuthenticationTokens.  What is meant by "custom authentication" is quite honestly, not very clear in the documentation. I believe that the following scenerios should work, if I would be interested in your comments from anyone:

    In the first scenario, the "portal" should generate a custom binary token and pass this token to the client flash in response. How the token is passed is an exercise left to the reader. It could be loaded via a cookie, JavaScript or ActionScript. It doesn't really matter. Nevertheless, the token is eventually read by the Flash client and applied using the DRMManager.setAuthenticationToken (...) method. The license server must then retrieve the token by using RequestMessageBase.getRawAuthenticationToken (...).  In this case, the token format is completely defined by the developer or provider. The flash never access client issues a query for the authentication License Server Manager (/flashaccess/authentication/v1 / *).

    A second case, which I am not sure would work, would be the flash client requests a token for authorization as usual, using DRMManager.authenticate (...), but the license server authentication requests handler returns a token custom instead of a serialized AuthenticationToken. The workflow would then proceed as described in the first case.

    A third case, the Flash client is able to authenticate with the name of user and password standard schema, but the license server may ignore the username/password real name (data can be same passwords and usernames dummy). The license server would generate an AuthenticationToken, but would benefit from ApplicationProperies to store its information "custom token. The token would be then sent back to the customer and in turn transmitted to the same license server. The license server then inspect AuthenticationToken.getCustomProperties to determine the appropriate course of action.

    No matter what scenario is used, I have a few concerns with custom authentication tokens:

    First of all, this forum has several questions about custom authentication tokens. The documentation is not clear on what is intended and how exactly these tokens must be produced, transferred and consumed. It would be very useful for Adobe to provide an example with its reference implementation code.

    Second, as developers of server Flash Access License remain to design their own authentication scheme customized, there is a real concern that the invented approach can be precarious, allowing re-use of authentication tokens. A published set of best practices would help to ensure custom tokens are generated in a way that does not leak the information, allow attacks by replay or session hijacking.

    Finally, there seems to be some confusion about the use of tokens for authentication and authorization. The reference implementation clearly only use them for authentication, as the RefImplLicenseReqHandler makes additional checks the database for the authenticated user is allowed (subscriber) to access the content.  However, the paragraph quoted above suggests using these tokens for authentication and authorization. At least, that's what I understand by the notion that "audit token is stateless and was completed independently by each server without referring to a database or other shared state. I don't see how that's possible, unless the token contains authentication and authorization information. I'm wrong?

    I appreciate the thoughts of someone else on the custom authentication tokens. Thank you.

    -Aaron J

    The workflow for "custom authentication" is exactly what you described in your first scenario.  Namely, the client application gets a token through certain channels and calls DRMManager.setAuthenticationToken (...) to provide the token. When the client requests a license from the license server, this token is included in the request. The server application calls RequestMessageBase.getRawAuthenticationToken (...) for the access token and perform any validation is required for this type of token before issuing the permit. With a custom authentication, the SDK AuthenticationToken class is not used - this class is only used to represent the authentication tokens issued by using the name of user and password Flash Access authentication scheme.  A custom authentication token can be binary data - the Flash Access SDK is not involved in the generation or to consume these chips - it's your server implementation to manage the following steps.

    The motivation behind the 'custom authentication' scheme is not to force content providers to invent a new way to authenticate users, but to allow you to take advantage of all infrastructure you already have in place.  For example, if you are already running the SAML tokens to authenticated users, you can continue to do so, and you would just plug the SAML validation code in your license server. As a general rule, an authentication token is signed to prevent tampering. It would be possible to generate a signature using a symmetric key or with a private key. Then, checking on the server would involve checking the signature, either by using the same shared symmetric key or with the public key corresponding to the private key. (This is what is meant by 'token is based on a secret or public key shared infrastructure (PKI) ")

    Although the API reference to "authentication tokens", it would also be possible to take advantage of this authorization mechanism. For example, if you have a web portal to access the information on which a user is allowed to access the content, the Portal could issue an authorization token that says that the user X is allowed to play the content Y and Z. When the license server receives this token in a license application for content, simply, check the token is still valid and that the token States it is allowed to grant access to the content Y. This workflow, the license server doesn't have access to the database that contains authorization information, making it easier to deploy the server in a highly scalable way.

    Is this address your questions and concerns?

  • Adding a custom authenticator: could not find sawobisauthenticatorproxy3r.dll

    Gentlemen.

    I need to integrate Oracle BI EE 10.1.3.4.1 with workspace 11.1.2. To offer the opportunity to work with some BI stuff in Hyperion Workspace to my users.

    Has studied two documents:

    (1) including Oracle BI EE 10.1.3.4.1 Workspace 11.1.2

    http://www.Oracle.com/WebFolder/technetwork/tutorials/OBE/Hyp/WS11.1.2_OBIEE/WS11.1.2_OBIEE.htm?cid=4675 & SSID = 0

    (2) oracle® Business Intelligence News Guide Release 10.1.3.4.2

    http://docs.Oracle.com/CD/E10415_01/doc/bi.1013/e10416/general_10134.htm

    There is a 'Configuration Repository to use a Custom Authenticator' step, and I am confused with it.

    It is said:

    ~~

    In the Oracle's administrator of BI tool, open the file appropriate to the RPD and follow these steps:

    ...

    In the custom authenticator dialog box, click Browse to specify the next value for the Authenticator plugin file:

    sawobisauthenticatorproxy3r.dll

    Note: This file is in the OracleBI\web\bin directory

    ~~

    My BI environment is installed on the server, RHEL. So I installed Oracle BI Administrator Tool on Windows laptop, copied the RHEL server on cell repository, will update the repository and copy it then. But there is no file sawobisauthenticatorproxy3r.dll under the C:\OracleBI\web\bin directory. How could it be? Where can I get this file? Well Google, no option to enter on the internet. I'm sure that this step cannot be ignored.

    Guys, please advice how to solve this problem. Or maybe someone might want to send me this file sawobisauthenticatorproxy3r.dll plugin (if it's can't apply an env).

    Kind regards

    Victor.

    Phew. I found the solution. Uninstalled Oracle BI laptop computer administrator tool and installed OBI EE. Now I see

    sawobisauthenticatorproxy3r.dll in C:\OracleBI\web\bin

    and can process my deposit.

  • The ISE - user not found internal user authentication failed

    Salvation of the Forumers

    I try to make wireless 802. 1 x, where the identity store using the internal users.

    But I got this error message when I try to connect

    Authentication failed                                                                                 :

    22056 object was not found in the identity of the point of sale

    My authrorization rules is built like that

    identity groups = user identity group / "mygroup".

    condition = no setting

    Permissions = standard / PermitAccess

    Question 1

    Any troubleshooting step to do about it?

    Question 2

    For authorization rules, what is the condition put to use internal user as the identity store?

    Thank you

    Noel

    The error is due to an authentication failure and is not a problem with authorization

    You must watch your authentication (policy-> authentications) and see what storage of identity has been authenticated against

    Moreover can do authentications Live page (monitor-> authentications) and to record failure, click the icon under details. This will give you details of the request processing and you can see what rule was accompanied in the politics of identity (matching political identity rule) and "banks chosen identity.

  • EPCO 12.1.3.1.1 and ADF Essentials customer - adf - controller.jar not found

    OEPE-12.1.3.1.1-Luna-distro-Linux-GTK-x86_64

    ADF-Essentials-client-EAR (12.1.3.0)

    ADF-Essentials (12.1.3.0)

    Using EPCO 12.1.3.1.1 and try to create a project of the ADF and deploy on GlassFish - 3.1.2 or GlassFish - 4.1.

    ADF-essentials (12.1.3.0) installed in GlassFish - 3.1.2

    Then create a project of the ADF

    Then create user library containing the adf-essentials-client-ear (12.1.3.0)

    Result:

    Invalid library: adf - controller.jar not found. Please download ADF critical Client and define a library validates.

    Figured it out.

    Initially, I downloaded the Client Oracle ADF Essentials 12.1.3.0.0 * EAR * which, after the creation of the library to the user caused the error.

    I then downloaded ADF Essentials customer 12.1.3.0.0 * WAR * and installed the client library.

    Max...

  • Host shows as "Not found" in custom webview.

    I'm running a problem with the launch of the workflows of a webview custom since the vCO to vCO 5.1 4.2.1.  When start a workflow and selecting an object (host, network, data store, etc.), the selected item will change to "not found".  I am able to select with the help of another applicant (treeview or list) or by typing the name of and by selecting in the menu dropdown.

    Workflow.jpg

    For my case of test as in the photo above, I deployed a new vCO device 5.1 (vCO configured and installed vCenter plugin only) and a new default template webview.  The only change I made to the template add the following link to default.html in the tag of the vco.

    <a jwcid="@vco:WorkflowLink" workflow="newVm" isDialog="true">New VM</a>
    

    The Web mode attribute 'newVm' is of type workflow and designates the workflow of library "Create simple virtual machine."  I logged in the Web using an ID mode who is a Director of vCO.  The screenshot above is after the launch of the workflow and the selection of a host for the "Host" field on which to create... ».  The really strange thing is that this problem will not occur when you use the Web webview!  The section spans server.log attached connection time to the webview just after the problem occurs.  Any ideas as to why this is happening?

    Found this: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2048629

    That looks like you can be on the right track to solve this problem.

  • Could not open custom.pll error: BDP-PLI018 not found OEXOELIN library

    I have a custom.pll since a 11.5.10.2 instance. I try to open it with Forms6i

    In the regedit FORMS60_PATH is 'C:\orant\FORMS60; C:\orant\TOOLS\OPEN60\PLSQLLIB ".

    I get an error message
    BDP-PLI018 not found OEXOELIN library

    How this problem should be solved? Any help is appreciated.

    The file as oexoelin. PLL isn't here in one of the directories.

    So how do you forms to find the library if it is not in the FORMS_PATH? You need a local copy of all files in the \AU_TOP\RESOURCES directory on your local or network so forms will have access to these files. I'm not positive of the AU_TOP - it has been some time since I worked with EBS. Check with your DBA / SA confirm where these files are and how your development environment must be configured to resource these files.

    Craig...

  • Develop the custom page for the file not found

    Hello

    We have a custom page to handle 404 errors for html documents. But when a coldfusion page is not found, it shows a file not found error message generated by Coldfusion. Is it possible to set a custom page when occurs an error like that. or is there a web page in the directory somewhere which can be edited.

    Thank you

    Thanks it solved our problem.

  • Error trying to use custom BB card not found CommandHandler

    I get the error that the net.rim.device.api.Command.CommandHandler is not found when I try to add any type of code to my application to open a personalized card. I searched the api, this Board and all samples and still can't seem to find a way to make it work. Here is the latest version of the code I have:

        public class InvokeMapViewScreen
        {      
    
            InvokeMapViewScreen()
            {
    
                MenuItem viewMapItem = new MenuItem(new StringProvider("View Map") , 0x230010, 0);
                viewMapItem.setCommand(new Command(new CommandHandler()
                {
    
                    public void execute(ReadOnlyCommandMetadata metadata, Object context)
                    {
                        MapView mapview = new MapView();
                        mapview.setLatitude(38785101);
                        mapview.setLongitude(-90602145);
                        mapview.setZoom(3);
    
                        Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(mapview));
                    }
    
                }));
    
                addMenuItem(viewMapItem);
            }
    
        }
    

    My application will not work, and I get the message error than CommandHandler not found. Does anyone have any ideas on how I can get this to work?

    Just take a glance at page 18 on http://docs.blackberry.com/en/developers/deliverables/1181/GPS%20and%20BlackBerry%20Maps%20Developme...

  • Custom authentication does not work after upgrade to 4.1

    Hi, are there problems with authentication in 4.1? I can't get my new authentication scheme to work for some reason any. I was wondering, is that there are problems with 4.1?

    Thank you

    Published by: Andyindo on Sep 17, 2011 14:57

    Hi Andyindo,

    Name your packagename.function in your custom authentication as the below and check.

    >return final_users_security.valid_user

    Brgds,
    Mini

    -----------------
    Mark responds promptly

  • The page you are looking for is not available. You may need to contact your administrator with this error: 404 Page not found.

    I am at a loss.  I've set up a root certification authority to sign all servers in my workspace of Horizon, SAML is in the Green and after a lot of reading when troubleshooting also synchronized on all my ESXi hosts and guests.

    Basically, what I did is the following:

    Set up the connection to the Server VMware View Horizon 5.2 - created different pools and can connect via the customer different platform. (a few times to eliminate any possible configuration errors along the way)

    Configuration of VMware View Horizon Workspace 1.0 (a few times now) with self-signed and CA signed certs.  My workspace appears fine, the synchronization of files, apps work, and view pools appear.  When I try to launch your desktop from inside the Horizon workspace I get this error:

    The page you are looking for is not available. You may need to contact your administrator with this error: 404 Page not found.

    Now I think that I followed it down to something to do with SAML connection - which, to my understanding, archery chips between workspace and view.  On the login server, I see it in the Windows event log:

    BROKER_USER_AUTHFAILED_SAML_ACCESS_REQUIRED

    SAML access required but not tempted by customer

    Attributes:

    Source = com. VMware.VDI.Broker.filters.SamlAuthFilter

    Time = MON may 20 16:06:41 MDT 2013

    Gravity = AUDIT_FAIL

    Node = ViewConnection.access360.ca

    Module = broker

    Recognized = true

    Something is not crossing to allow me to access my office view since the workspace of Horizon.  If I remove the requirement of SAML on the login server see, when I try to connect to a desktop computer from the view connection server I get a promotion for and can I get my IDs & field and have full access with reviews, as well as blast HTML - just cannot get there with Horizon Workspace.  There must be something that I am missing with SAML...

    As I said, I'm at a loss here on what does not work between the Horizon workspace and the connection of SAML for display to connect to the server.  There is no server security, server transfer, and firewalls is all off, so I don't think it's a network problem.  Simple as possible.  The Windows Journal event displays the login displays server error is: access required but not attempted by client SAML.  I have all my servers synchronized after a few seconds - so I don't think that documented the TIME Horizon workspace synchronization time sensitivity is responsible here.  I am Pack overnight, but will do exactly the same thing with a client of tomorrow - hopefully without the same result!

    Any ideas?

    A

    So I re-deployed the VAPP (again!) very attentive as I went.  As usual, the initial database installation failed because I entered my domain FULL of the gateway name, so it does not match.  After useful messages already there for this (Workspace install fails with error creating the user admin) I used the wizardssl.hzn of connfigurator - going to recreate a rootca to the environment based on my FULL domain instead of the bridge - going and then let it grow all for the other vApps.  I then connected to each and pulled down my private rootca and ran c_rehash, etc. (another useful message!- adding MS signed Certs to Horizon Workspace & laquo;) Carlos & #039; Corner) I actually use my background to UNIX and openssl to be my own private CA and sign all of my certificates.  I created the SAN cert and added to the SSL configuration on the Configurator - going and connector - going.  Oddly enough, both of these server do not appear to be accepting SAN cert that includes their ENTIRE domain, but that's for another day... My Horizon Workspace FQDN does show as being approved by installed RootCA private (which does not have other DNS names for the service - going, the Configurator - goes, the data - will and the connector - will, but as I have already said--a battle for another day) so it's a good thing.  I joined my workspace to my domain name - well!  Activated would be pools seen in the Configurator - goes - sync - good.  CRT for the my display login server has accepted and implemented the SAML trust.  Still good.  Sync in my opinion users group who already had a couple of linked clone pools allowed to do.  Good.  Connected to the FQDN of my workspace and clicked on computers - seen my 3 pools.  Clicked on one and after a few seconds, launched in a new window of the explosion.  Success!  I disconnected and connected on a different machine, and something that I saw before, but doesn't have a lot of attention to was the connector - will put 'use windows authentication', I couldn't understand why every time I sailed on my Horizon workspace a no vmware window opens asking access my FQDN:443 with a user and pass.  It is this setting - duh.  I'm not sure yet that gives me, so it's off for now.

    Thanks for all the input: it's good to know that there are others with some of the same questions.  It's still v1.0, it is related to some of these pitfalls.  It is capricious with derived from same time less than 10 seconds seems to have a negative impact.  Had to ensure my ESXi servers were strong (never worried a lot in the past with MS AD being quite tolerant with small derivatives) I tired my vApps affecting a NTP, but they seemed like being left to the default of synchronization to the ESXi host.  See how than pans.  CERT is somewhat capricious depending on your deployment.  Of course the connector - will and the Configurator - must be signed by a CA that they are internal, but always be nice to then have signed internal...

    Now, I'm on ThinApps for desktops as well as the web interface integration.

    I bumped my head against the wall with my first configuration of Citrix XA and XD (before having VDI in a box!) and it was the best way to learn.

    I don't know that I grave along that I finished my PoC, but I'm very happy with today's results.  I still plan on the comparison of my logs successful with the logs I have pulled my former deployment TIME and see what it was that it was broken.  I think it was that wanted me a PTR record to my domain FULL DNS MS. name  I think I just had the direct search for the original bridge - will and FULL, but only a setback for the gateway domain - name.  Would explain why I was never able to connect to the gateway to access your desktop.  Oops.

    A

  • Apex 4.1 - Websheets with the custom authentication scheme

    Apex v4.1 (as seen on the hosted apex.oracle.com) - Websheets do not always seem to work with a custom authentication scheme. Database applications work very well with a function of sentry page, but when the same page sentry function is used for a websheet, running, it gives an error the requested page was not found

    One of the Apex team can consult? Thank you

    Hi Vikas,

    Websheet Sentinels have slight differences of sentinels of the application.
    I created a sentinel websheet for you which should operate (see below).

    Christian

    create or replace function sample_page_sentry return boolean
    is
        l_username   varchar2(512);
        l_session_id number;
        l_ws_app_id  number;
    begin
        -- check to ensure that we are running as the correct database user.
        if user != 'APEX_PUBLIC_USER' then
            return false;
        end if;
        -- get sessionid in cookie
        l_session_id := wwv_flow_custom_auth_std.get_session_id_from_cookie;
        if wwv_flow_custom_auth_std.is_session_valid then
            -- the session still exists. we configure the APEX engine to use
            -- this session id and the session's username.
            --
            -- NOTE: it is more secure to also check if this is the session id from
            --       the URL!
            --
            apex_application.g_instance := l_session_id;
            l_username                  := wwv_flow_custom_auth_std.get_username;
            if nvl(l_username,'nobody') != 'nobody' then
                wwv_flow_custom_auth.define_user_session(
                    p_user       => l_username,
                    p_session_id => l_session_id);
                return true;
            end if;
        else
            -- session can not be reused, create a new one
            l_session_id := apex_custom_auth.get_next_session_id;
        end if;                                                                                 
    
        -- the current session is unauthenticated. we have to determine the user
        -- and log in.                                                                          
    
        -- get the username from somewhere, e.g. a cgi variable. it is hard-coded
        -- here for simplification.
        l_username := 'VANJ';
        -- configure the engine to use this username and session.
        apex_custom_auth.define_user_session(
             p_user       => l_username,
             p_session_id => l_session_id );
        -- build a deep link to the websheet start page
        l_ws_app_id  := apex_util.get_session_state ('WS_APP_ID');
        wwv_flow_custom_auth.remember_deep_link (
             p_url=>'ws?p='||l_ws_app_id||'::'||l_session_id );
        -- register the session in apex sessions table, set cookie, redirect back.
        apex_authentication.login(
             p_username => l_username,
             p_password => null );
        return true;
    end sample_page_sentry;
    /                                                                                           
    

    Published by: Christian Neumueller November 15, 2011 07:07 (a wiki format error corrected)

Maybe you are looking for