Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Passing username & password to an URL from Apex

696920Jul 31 2009 — edited Aug 24 2009
Hi,

I have a button. I have asigned a URL to it. But that site needs a login to get to its pages. How can I pass username & password in URL to access that outside page?

Wajid

Edited by: user5533127 on Jul 31, 2009 11:10 AM

Comments

dmcghan
Wajid,

Parameters are passed via standard url syntax. Having said that, passing usernames and passwords in a URL is a VERY bad practice. Are you sure the other application would allow this in an unencrypted format?

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur

You can reward this reply by marking it as either Helpful or Correct ;-)
696920
Hi Dan:

Thanks for prompt reply. What is the best way to do that? I agree with you that embedding in a URL is not a good idea.

Wajid
dmcghan
Wajid,

What's the best way to do what?

Have you ever access one of these pages with a username and password in the URL before? How did you do it?

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur

You can reward this reply by marking it as either Helpful or Correct ;-)
696920
Dan:

Yes. I created a button. Type selected was URL. In its source I copy and pasted the URL of desired page. When I click button it takes me to the application login screen. After manually login I can see the page.

I want login screen do not pop-up on the press of button. Somehow I embedd logins in Apex.

Wajid
dmcghan
Wajid,

That's not quite how it works... You not only have to populate the items, you also have to submit the page for processing. Also, where do you intend to store these passwords? This is a bad idea...

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur

You can reward this reply by marking it as either Helpful or Correct ;-)
696920
Can I store password and username in Items?

I have no idea how to accomplish that. That's why I opened the thread.

Wajid
dmcghan
Wajid,

I like helping people figure out things that make sense. This doesn't make sense to me. It's a bad idea all around. Even if you did populate an application item with the password, where would you have gotten the password from? Will both apps always have the same password? Will you be storing multiple passwords in the DB in clear type?

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur

You can reward this reply by marking it as either Helpful or Correct ;-)
696920
I have password for the target application. I just want to eliminate manual fill-up of passwords login page.

Wajid
user634836
I have exact same desire as Wajid has. it kind of ssn concept. we don't want user keep logining once they get into our app which built with a tool from the other vendor and plus apex for easy to implement.
user10886422
I have similar issue, i want the Login Username in to an Item of anoter page, iam able to get the value in to the item but the value is not the same as the login Username but its populating the First Username while creating the application.

Please help me in getting the latest Login Username in to an Text Item of another Page.

or

Help me in using any alternative method for getting the latest login username.

Thanks
Venkat
696920
Venkat:

I hope it helps you. You can call logged in username in following ways.

Bind variable :APP_USER
PL/SQL V('APP_USER')
Substitution string &APP_USER

Consider the following examples:

■ From within an HTML region:
Hello you are logged in as &APP_USER.

■ Using PL/SQL:
htp.p('Hello you are logged in as'||V('APP_USER'));

■ As a bind variable:
SELECT * FROM some_table WHERE user_id = :APP_USER

Wajid
user10886422
Hi Wajid,

Thanks for the immediate response.

I have tried your option :APP_USER, but the value its displaying is APEX_PUBLIC_USER where as i login as XYZ.

I have created login page based on a custome table, its perfectely working fine.

For Example:

After creating the login page
I have modified the Login process to verify the login credintials from custom table and process to next page else display error message.

login as
P1_Username = XYZ
P1_Password = 123

The above process is working fine.

I have created a Text Item in the page 2 to capture P1_Username as
Source Type = Item (application or page item name)
Source Value = P1_Username

Now i am capturing the P1_Username in Text Item of the next page to update custom table as last_modified_by.

For the first attempt the value in the Text Item was XYZ as i have login as XYZ.

But for the next time when i login as ABC the value in the Text Item still displaying as XYZ where as it should display ABC.


Please help me in this issue.

Thanks in Advance

Venkat
696920
Kindly make sure there is a period/full stop after substitution variable:
&APP_USER.

Wajid
1 - 13
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 21 2009
Added on Jul 31 2009
13 comments
2,378 views