6 Replies Latest reply: Apr 25, 2013 3:54 AM by newenrba RSS

    Plugin for Authentication


      I am using Oracle 10g Express 4.2. I made a plugin for authentication, I also made a function that implements the interface for the plug-in. Now I'm trying to add a new parameter (attribute 01), which will contain the value of APP_ID. However I am unable to forward the value APP_ID. Parameter which I made is PLSQL Expression with default value of :APP_ID but in function i am getting string value as ':APP_ID'. I also try others type of parameter but allways i am getting string value (name of component never value of commponent)

      Did any one get same problem? Or is there other solution, i read API for plug in http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_plugin.htm#BAJCGGEI and this record do not contain app_id.

      PS: function is implemented in database not in apex

      Thank you for u time

      Edited by: newenrba on Apr 25, 2013 12:26 AM
        • 1. Re: Plugin for Authentication

          Try &APP_ID. or v('APP_ID') in PL/SQL.
          Read documentation here
          • 2. Re: Plugin for Authentication
            it just want work, i try with all
            of this
            Bind variable :APP_ID
            PL/SQL NV('APP_ID')
            Substitution string &APP_ID.

            I create parametar for plug in like text, number, plsql expression, set its require yes, then in auth schema place all of this :APP_ID, &APP?ID. etc. but, after executing log in function in database for this attribute i am getting just string not value. i try all combinations but no. I think its bug in plugin or.....
            • 3. Re: Plugin for Authentication
              Inside the plugin code you can use nv( 'APP_ID' ) to get the APP_ID.
              But if you want to pass it as a parameter make sure you set "Substitute Attribute Values" to YES
              You can set this only for APEX 4.2
              • 4. Re: Plugin for Authentication
                Patrick Wolf-Oracle

                if you define a custom attribute of type "PL/SQL Expression", it's the responsibility of the plug-in to actually execute the entered value as PL/SQL expression. We provide utility functions like apex_plugin_util.get_plsql_expression_result to help you with that.

                In your case I wouldn't use a PL/SQL Expression. Based on your description you can skip that parameter at all and directly use
                apex_application.g_flow_id or nv('APP_ID')
                in your plug-in code. If you want to make it configurable, define the custom attribute of type "Number" and enter &APP_ID. as value.

                Member of the APEX development team
                My Blog: http://www.inside-oracle-apex.com
                APEX Plug-Ins: http://apex.oracle.com/plugins
                Twitter: http://www.twitter.com/patrickwolf
                • 5. Re: Plugin for Authentication
                  Ty for answer but again,

                  Sub String is set on YES, have parameter as plsql expression, it is require.

                  I call auth fn from database this mean that in plug in i dont have implement PLSQL code. In database i can read all attributes of t_authentication record but just cant pass value of APP_ID.
                  for this plug in. What ever i try to pass to database (including custom item) its allways pass item name but not item value.

                  :S pls if u have some link on net.
                  • 6. Re: Plugin for Authentication

                    Thank you Patrick, "Number" and &APP_ID. is right for my case.

                    PS: thank you for your blogs and answers always help me i lot :)